I fired 20 requests at a Node.js handler. Every client left after 100 ms, but the server still ran all 100 steps. With a disconnect check: 0 of 100. pg 8.23.1 accepts { signal } but ignores it. dev.to/shubhradev/a...
shubhradev
shubhradev
@shubhra.dev
Building shubhra.dev - a developer platform for production-grade React & Next.js. Practical tutorials, reusable code snippets, interactive quizzes, developer tools, and free resources to help developers build, ship, and maintain real-world applications.
7 followers6 following33 posts
My article on Node.js request cancellation has been featured in @dev.to Top 7 Featured Posts of the Week. Thank you to the DEV team and everyone who read and joined the discussion. I really appreciate it. ❤️ dev.to/devteam/top-...
What happens when an AI agent reads a document and decides to take action? 👀 I built a small Next.js agent to find out. Here’s what I learned about securing its actions 👇 dev.to/shubhradev/y...
7 React 19 Suspense mistakes that break production • Expecting it to fetch • useEffect suspension • Recreating Promises on render • 1 global boundary • Too many tiny boundaries • Misunderstanding Transitions • Using it for error handling Read Deep Dive 👇 shubhra.dev/tutorials/re...
1/3 You don't always need a 20-minute tutorial. Sometimes you just need the rule you're trying to remember right now. So I compressed everything about React 19 Suspense into a quick-reference cheatsheet. 🧵👇
3/3 The full tutorial explains the "why." The cheatsheet is for the next time you're staring at a Suspense bug at 2 PM and need the rule fast. 🔖 Bookmark it here: shubhra.dev/resources/re...
1/4 One of the most common misconceptions about React Suspense: “Suspense fetches my data.” It doesn’t. Suspense is a coordinator, not a data-fetching library. 🧵👇
Want to see how this mechanism actually behaves under the hood? I built practical experiments to demonstrate it step-by-step: shubhra.dev/tutorials/re...
1/4 One of the most common misconceptions about React Suspense: “Suspense fetches my data.” It doesn’t. Suspense is a coordinator, not a data-fetching library. 🧵👇
Next.js 16 Authentication Architecture 🛠️ A minimal, self-hosted auth foundation without heavy external libraries. Uses bcrypt, JWTs, httpOnly cookies, proxy middleware, and PostgreSQL. Completely free & open-source (MIT). Full scaffold & setup: shubhra.dev/products/nex...
What if your Next.js cache tags were type-safe? Instead of scattering "posts" and "users" strings everywhere, use a central tag registry. That's one idea behind Cache Pro Kit. Check it out at 👇 shubhra.dev/snippets/nex...
Stop making users wait for server roundtrips ⏳ Optimistic UI updates instantly: 1️⃣ User clicks 2️⃣ UI updates immediately 3️⃣ Server processes 4️⃣ Confirmed (✓) or rolled back (↩) Here's Next.js useOptimistic full implementation guide: shubhra.dev/tutorials/ne...
generateStaticParams() doesn't protect you from uncached data. In my Next.js 16 + Cache Components test: Known params + uncached data → build error The reason is simple: knowing the URL params doesn't mean the data can be prerendered. Full test: shubhra.dev/tutorials/ne...
Cache invalidation gets messy fast. Scattered cache tags make it easy to mistype or forget what needs invalidation. I built a small toolkit to make Next.js cache invalidation more manageable. Check out at shubhra.dev/snippets/nex...
generateStaticParams() tells Next.js which paths are known at build time. It does NOT automatically make their data static. With Next.js 16 Cache Components, generateStaticParams, "use cache" and <Suspense> solve different problems. I tested the behavior: shubhra.dev/tutorials/ne...
generateStaticParams ≠ static route in Next.js 16. I tested it with Cache Components: → Uncached data: build error → + <Suspense>: Partial Prerender → + "use cache": fully static Knowing the params isn't enough. shubhra.dev/tutorials/ne...
React 19 useTransition gotcha: After await, the code is no longer inside the original Transition context. So this: await save(); setState(...) needs another startTransition() if that update must remain part of the Transition. shubhra.dev/tutorials/re...
useTransition does NOT guarantee request ordering. A starts → B starts → B finishes → A finishes. That older A result can overwrite B. The Transition works. Your data can still be stale. shubhra.dev/tutorials/re...
useTransition looks simple until async work enters the picture. await can break Transition context. Rapid requests can race. Errors need an Error Boundary. Controlled inputs shouldn't be transitioned. I tested all of these in React 19. shubhra.dev/tutorials/re...
Next.js 16 question: An uncached `fetch()` doesn't need fresh data on every request. Should you automatically use `<Suspense>`? Not necessarily. Test yourself: shubhra.dev/quiz/nextjs-...
Next.js 16 Cache Components trap: Your page doesn't call cookies(). Your build still fails because a shared layout does. The error can point at the page while the problem is higher in the layout tree. shubhra.dev/tutorials/ne...
Think you understand Next.js 16 Cache Components? 15 questions. 15 minutes. 70% to pass. Six build-error triggers. Three possible fix paths. One nasty layout trap. shubhra.dev/quiz/nextjs-...
Next.js 16 Cache Components gives you 3 apparent fixes: `<Suspense>`, `"use cache"`, or `instant = false`. But they're not interchangeable. I broke 6 cases to find the right fix for each. shubhra.dev/tutorials/ne...
Next.js 16.3 is really two upgrades. One is automatic: less dev memory, faster builds and better SSR. The other is opt-in: Instant Navigations + Partial Prefetching. We break down both and what to enable. shubhra.dev/blog/nextjs-...
A login form isn't a production-ready auth system. The Next.js 16 Auth Kit uses 3 security layers: Proxy → Server Components → Data Layer. Plus OAuth, email verification, password reset, RBAC, admin functionality, rate limiting & secure httpOnly cookies. shubhra.dev/products/nex...
React 19 Actions didn't replace forms. They changed where the complexity lives. React handles much of the submission plumbing, but validation, error UX, optimistic UI, authorization and security still require engineering judgment. A deeper look at what changed: shubhra.dev/blog/react-1...
React 19's useActionState, useOptimistic, useFormStatus, and useTransition can look like four unrelated APIs when learned separately They're actually different ways of working with Actions and Transitions We put the whole model together in Part 4 of React 19 Deep Dive shubhra.dev/tutorials/re...
Authentication isn't difficult because of the login form. It's difficult because of everything that comes after. OAuth. Email verification. Password reset. Roles. Sessions. Security. We packaged all of that into a production-ready Next.js 16 Auth Kit. 🔗 shubhra.dev/products/nex...
New tutorial published React 19's useFormStatus simplifies pending UI for forms without passing loading state through multiple components. This tutorial explains how it works, when to use it, common mistakes, and production-ready patterns. shubhra.dev/tutorials/re...
Responsive design isn't just media queries anymore. Grid, Flexbox, Container Queries, fluid typography and responsive images have changed how we build adaptable interfaces. We put together a practical guide: shubhra.dev/tutorials/re...
You are up to date.