name: react-19 description: React 19.3+ patterns. Use for forms, async data, pre-rendering, transitions, refs, context, metadata.
React 19.3+
Avoid → Use
-
useState+onChangefor forms →useActionState→examples/form-action.tsx -
awaitin server components → pass promise,use()in client →examples/use-server-promise.tsx -
forwardRef→refas prop -
useCallback/useMemo→ compiler handles it -
useContext→use(Context) -
Context.Provider→<Context value={}> - Manual state reset on prop change →
keyprop
Patterns
-
Forms:
useActionState(fn, init)+useOptimistic+useFormStatus→examples/form-action.tsx -
Pre-rendering:
<Activity mode="hidden">→examples/activity-prerender.tsx -
Effect events:
useEffectEvent()for non-reactive logic in effects →examples/effect-event.tsx -
Async data: pass promise from server, unwrap with
use()→examples/use-server-promise.tsx -
ViewTransition: wrap elements, use
startTransition()+addTransitionType()→examples/view-transition.tsx -
Mutations outside forms:
useTransition+ Server Action →examples/server-action-mutation.tsx -
Suspense:
<Suspense fallback={...}>wraps async components -
Deferred value:
useDeferredValue(value, initialValue) -
Request memoization:
cache(async fn)withcacheSignal() -
Server Action:
"use server"+revalidatePath()/revalidateTag() -
Metadata:
<title>,<meta>,<link>hoisted to<head> -
Refs:
refas prop, cleanup via return function
Component structure
- One component per file
- Inner functions use arrow syntax:
const handleX = () => {}
chat Comments (0)
Sign in to join the discussion and leave a comment.
Skill Details
GitHub Stars
0
GitHub Forks
0
Created
Jan 2026
Last Updated
5 months ago
tools
tools frontend
Related Skills
Build your own?
Join 12,000+ developers contributing to the Claude ecosystem.
No comments yet. Be the first to share your thoughts!