The Next.js Server Action That Looked Like a Bug (And Wasn't)
React 19 resets uncontrolled form fields after a server action returns — on success and on non-throw failure. The DB write lands fine. Only the UI
React, Next.js, CSS and the interfaces people touch.
React 19 resets uncontrolled form fields after a server action returns — on success and on non-throw failure. The DB write lands fine. Only the UI
react-hooks/set-state-in-effect fires as a hard error in Next.js 16. Three of my four cases had cleaner fixes. The fourth was legitimately right t
Two error-propagation traps in Next.js server actions — redirect() silently eaten by a try/catch, and Vercel's platform-level 4.5MB cap disguised
Never use a 302 redirect to 'protect' an API route. A redirect is page protection — not a gate. Exempt /api/ from your middleware, then add the r
The gate that was supposed to capture leads was the reason people were leaving. Flip the order — lead with value, catch them on exit — and your moda
Don't silence react-hooks/set-state-in-effect with eslint-disable. It's the lint telling you your SSR will break. The real fix is useSyncExtern
In Next.js App Router, generateStaticParams is NOT a whitelist. Drafts you exclude from the list are still publicly accessible by default. One lin
Next.js's file tracer can't follow dynamic import specifiers — so native packages that resolve their binary at runtime get silently excluded from yo
If you're auto-importing nodes into a React Flow canvas, derive position from an index. Never accumulate per-node offsets — they compound into an un
Next 16 killed middleware.ts. The replacement is proxy.ts — and it needs to live beside your app/ folder, not at the project root. I learned
If you're placing N nodes on a canvas by accumulating a running offset, stop. Compute position from index. It's deterministic, it's idempotent, and
The Setup
useState updates are async. If you call a function in the same tick as setState, that function reads the old value. Use a useRef alongside
will-change: transform, translate3d, and backdrop-filter each create a new GPU compositing layer. On a drag-and-drop board, that silently kills dr
dnd-kit's closestCenter is a geometry function. It doesn't know what you mean. When you have nested droppables, you have to write that intent yourse
if your custom Tailwind class keeps getting overridden and you can't figure out why, check whether it lives inside @layer components. If it does — and
If your server action succeeds but the UI reverts anyway — it's not a broken save. React 19 is resetting your uncontrolled input after revalidation.
Zod (a schema validation library) guards your runtime edges. Eliminating any makes TypeScript guard everything in between. You need both.
Persisting a conversationId in localStorage is easy. Securing it — so one patient can't accidentally read another's — takes one more step that's easy
After a sales data import, the dashboard still showed old numbers. I rewrote the entire write path before realizing the data was saving perfectly. The R
<canvas> is a replaced element. position:fixed; inset:0 will NOT size it to the viewport. Set explicit width:100vw; height:100vh in CSS AND si