Yash Nirwan Profile
Yash Nirwan

@yash_nirwan_

Followers
5
Following
80
Media
7
Statuses
53

Joined August 2022
Don't wanna be here? Send us removal request.
@yash_nirwan_
Yash Nirwan
1 month
Ever been confused by this in JavaScript?.You're not alone. It behaves differently in functions, objects, classes, arrow functions,even the DOM. I broke it all down clearly (with examples). Post link in the comments.
1
0
3
@yash_nirwan_
Yash Nirwan
2 months
0
0
0
@grok
Grok
2 days
Join millions who have switched to Grok.
117
237
2K
@yash_nirwan_
Yash Nirwan
2 months
I rebuilt React’s useEffect hook from scratch. Tracked deps, Handled cleanup, Simulated React’s mind. Learn why useEffect(() => {}, []) runs twice in dev, how StrictMode works, and how React decides when to re-run your effect. 👇 Full breakdown in the comments.
1
1
6
@yash_nirwan_
Yash Nirwan
2 months
0
0
0
@yash_nirwan_
Yash Nirwan
2 months
I rebuilt React’s component model in my head ,. from class components.to hooks. to how lifecycle actually works under the hood. no magic. just objects, effects, and a ton of learning. you don’t really understand React. until you know what it was before . breakdown in the comment.
1
0
4
@yash_nirwan_
Yash Nirwan
2 months
0
0
0
@yash_nirwan_
Yash Nirwan
2 months
I rebuilt React’s <Link> from scratch . - no router .- no dependencies . just JS, the History API,. - no reloads .- state stays .- URL updates instantly. why?. because you don’t really understand something,. until you build it yourself. breakdown in the comment.
1
1
2
@yash_nirwan_
Yash Nirwan
2 months
0
0
1
@yash_nirwan_
Yash Nirwan
5 months
7️⃣ Difference Between app.use() & app.all(). ✅ app.use(path, middleware): Runs middleware for all methods (GET, POST, etc.). ✅ app.all(path, handler): Runs for all methods but only on that path. #NodeJS #ExpressJS #Backend #100DaysOfCode
Tweet media one
0
0
4
@yash_nirwan_
Yash Nirwan
5 months
6️⃣ How Express Handles Requests Behind the Scenes. 🔹 Receives request.🔹 Matches the route & method.🔹 Executes middleware (app.use).🔹 Passes request to the matching route handler.🔹 Executes route handlers step by step (next()).🔹 Sends response.
1
0
2
@yash_nirwan_
Yash Nirwan
5 months
5️⃣ What is Middleware & Why Do We Need It?.Middleware functions sit between the request and response, allowing authentication, logging, validation, error handling, and more!
Tweet media one
1
0
1
@yash_nirwan_
Yash Nirwan
5 months
4️⃣ app.use() with Multiple Handlers.We can attach multiple route handlers at once using app.use().
Tweet media one
1
0
1
@yash_nirwan_
Yash Nirwan
5 months
3️⃣ Handling Errors in Middleware.Use next(err) to send errors to an error-handling middleware.
Tweet media one
1
0
1
@yash_nirwan_
Yash Nirwan
5 months
🔹 next() moves the request to the next handler. 2️⃣ What if next() is missing?.Without next(), the request stops at the first handler. The order matters !
Tweet media one
1
0
1
@yash_nirwan_
Yash Nirwan
5 months
🚀Route Handlers & Middleware in Express.js. 1️⃣ Multiple Route Handlers – Play with Code!.Instead of writing everything in one function, we can split logic into multiple handlers for cleaner, modular code.
Tweet media one
1
0
2
@yash_nirwan_
Yash Nirwan
5 months
🔹 Networking tasks don’t use the thread pool; they rely on efficient OS mechanisms like epoll & kqueue. 🔹 Streams, Buffers, and Pipes make data handling efficient. #NodeJS #JavaScript #Backend.
0
0
0
@yash_nirwan_
Yash Nirwan
5 months
🔟 Key Takeaways:. 🔹 Node.js is single-threaded for sync code but uses multiple threads for async tasks. 🔹 The libuv thread pool handles tasks like file system operations & crypto.
1
0
0
@yash_nirwan_
Yash Nirwan
5 months
9️⃣ Pipes: Simplifying Stream Operations. Pipes connect readable streams to writable streams, making it easy to transfer data. This method is faster & memory-efficient! 🚀.
1
0
0
@yash_nirwan_
Yash Nirwan
5 months
8️⃣ Buffers: Handling Binary Data. Buffers store raw binary data and are commonly used in:.✅ File system operations.✅ Network communications.✅ Streams. Buffers help Node.js process large data efficiently! ⚡.
1
0
0
@yash_nirwan_
Yash Nirwan
5 months
7️⃣ Streams allow reading/writing data in chunks, reducing memory usage. Types of Streams:.✅ Readable – Read data (eg fs.createReadStream).✅ Writable – Write data (eg fs.createWriteStream).✅ Duplex – Both read & write (eg TCP socket).✅ Transform – Modify data (eg compression).
1
0
0