react-19-primitives
Installation
SKILL.md
Sub-skill of react. Owns the React-19-only hooks and the <Suspense> API surface — what each one accepts, what it returns, what it suspends, and when to reach for it. The dean-stack-specific wiring of <Suspense> + use(idbHydrationPromise) at the app shell is owned by idb (which produces the promise and the Suspense pattern); this skill just describes the API the integration uses.
When to invoke
- Reading a value out of a promise inside render —
use(promise). - Splitting an update into urgent + non-urgent parts —
useTransition,useDeferredValue. - Showing an instant UI update before the real mutation lands —
useOptimistic. - Wiring a form action and reading its pending/result state —
useActionState,useFormStatus. - Authoring or moving a
<Suspense>boundary that isn't the dean-stack root one (whichidbowns — it producesidbHydrationPromiseand the Suspense wiring at the app shell).
Owns
React 19 primitives encouraged by the stack: use(promise), useTransition, useDeferredValue, useOptimistic, useActionState, useFormStatus, and <Suspense> boundaries.
Defers to
react(parent) — version pin and routing.react-compiler-rules— for "nouseMemoaround ause(promise)read"; the Compiler memoizes already.idb— for the dean-stack root<Suspense>+use(idbHydrationPromise)integration. This skill describes whatuse(promise)does;idbowns the promise itself, the Suspense pattern at the app shell, the debounced write-through, and theBroadcastChannelre-hydration.jotai— for theatomWithIDBfactory contract that consumes the hydrated state onceuse(idbHydrationPromise)resolves.tanstack-router-routing— for<Suspense>boundaries inside route components / loaders.