React
Components, hooks, rendering and the frameworks built on top of React.
2026
- Move from framer-motion to motion/reactReplace framer-motion with the motion package, update React imports, and check your existing animation entry points after the migration.
- Prepare for React 19 with 18.3 warningsRun your app on React 18.3, follow the development warning for ReactDOM.render, and migrate that entry point to createRoot before React 19.
2025
- Try upcoming React features with CanaryPin matching React and React DOM Canary builds, then check the export before trying ViewTransition in an app.
- Delete the effect that copies props into stateCompute a filtered list during render so it follows the current props without an effect or a second state update.
- Split state and dispatch into separate contextsSplit state and dispatch into separate React contexts to spare dispatch-only consumers from state updates.
- Write effects that survive Strict Mode double-runReturn a cleanup function so a subscription survives Strict Mode's extra development setup cycle.
- Generate hydration-safe IDs with useIdUse useId to associate labels and inputs with matching IDs on the server and during hydration.
- A localStorage hook with useSyncExternalStoreUse useSyncExternalStore to share a localStorage value across components and render a fallback on the server.
- Pick the right Testing Library queryUse accessible roles and names to query React components and diagnose a mismatch from Testing Library's error.
- Add a retry button to an error boundaryA React error boundary stays on its fallback until you reset it. Add a reset method that clears the error state and re-renders the children.
- Fix fetch race conditions inside useEffectA slow earlier request can overwrite a newer result. Ignore the stale response with a cleanup flag, or cancel it with an AbortController.
- Fix the controlled input warning in ReactKeep a React text input controlled from its first render by giving it a string value.
- Disable a submit button with useFormStatusRead a React 19 form's pending state from a child component to disable its submit button during the action.
- Fix React Testing Library 16 install errorsDeclare the DOM peer dependency to fix React Testing Library 16’s missing module error.