How to Use XState for Complex React Workflows
Model React workflows as state machines with XState. Create a machine, run it with useMachine, and render each state explicitly.
Build modern UIs with React
Model React workflows as state machines with XState. Create a machine, run it with useMachine, and render each state explicitly.
Learn the difference between client state and server state in React, and which tool fits each one.
React 19.2 ships Activity, useEffectEvent, cacheSignal, Performance Tracks, and partial pre-rendering, plus SSR and tooling changes that matter in practice.
Group React files by feature so the code that changes together lives together, instead of sorting every file by its type.
Separate components that read data and state from components that only render, using Hooks and props instead of class containers.
Break large React components into small pieces with children, explicit slots, and focused components instead of piling props into one file.
Move pricing, validation, and other rules out of components into pure functions and custom Hooks so React UI stays thin.
Expose a limited set of visual choices through a variant prop and let callers fill named regions with slots, so a component stays small and hard to misuse.
The React design patterns that still matter with Hooks: composition, custom Hooks, compound components, controlled components, and the provider pattern.
Stop components from collecting dozens of props by composing children, grouping related values, and reserving context for truly shared data.
Extract components and custom Hooks to remove real duplication and coupling, not because a file got long. Learn the signals for each.
Refactor a large React component without changing what users see by writing a behavior test, extracting pure functions, and splitting in small steps.