React & Next.js
React 19 and Next.js conventions
React 19 + Next.js
- Server components by default — layout.tsx, loading.tsx, error.tsx are server components
'use client'only when needed — components with hooks must be client components- No IIFEs in JSX — extract to a named component instead
- No raw HTML elements when shadcn has a component — use
Buttonnot<button>,Tablenot<table>,Progressnot nested divs use*hook naming enforced- Stable array keys — never use indices
<Suspense>arounduseSearchParams()- No
Date.now()/Math.random()in render