A complete reference for core hooks and the latest React 19 additions.
Unlike useEffect, 'use' works with Suspense to handle loading states elegantly.
useActionState tracks validation errors and results, while useFormStatus handles the loading UI.
The message appears instantly with a "Sending..." badge, followed by the actual state update 2 seconds later.
Check the console: "Filtering items..." only logs when you type, not when you click Toggle.
Last Clicked: none
Note: Clicking "Increment Parent" changes parent state, but the child buttons do NOT re-render (check console) because their onClick prop remains referentially equal.
Clicking the buttons below will update the state, triggering a re-render of this component.
The effect runs when the component mounts and whenever the isRunning state changes.
This child component is consuming context:
Hello, World!The data is managed in the parent and accessed directly by deeply nested children.
useRef is useful for accessing DOM elements or storing values that don't trigger re-renders.
Notice how toggling the theme is instant because it doesn't trigger the slow calculation (only changing the number does).
Child Component List:
Watch the console: the List child component only updates its items when the number changes, not when the theme toggles.
Comparison:
"Use useMemo for computing data; use useCallback for stabilizing callbacks."
useAuth).