pending state
The in-between state while asynchronous work, such as a transition or form submission, has started but not finished.
In more detail
useTransition and useActionState provide isPending automatically, so you no longer have to keep your own isLoading boolean in sync. Use it to disable buttons or show a spinner, dimmed content or skeleton.
Related terms
- useTransition — The React hook that returns an isPending flag and a startTransition function for marking state updates as non-urgent transitions.
- useActionState — The React hook that wraps an Action and returns its latest result, a function to trigger it, and an isPending flag.
- Boolean — A value that can only be true or false.
- skeleton screen — A grey outline of the content that is about to load, shaped like the real layout, shown instead of a spinner.
Taught in
- Complex State with useReducer: State Machines And Action Types — React 19 & Modern Component Architecture
- Custom Hook Composition: Encapsulating Reactive Logic — React 19 & Modern Component Architecture
- useTransition: Non-Blocking State Updates for Fluid UI — React 19 & Modern Component Architecture
- useActionState: Async Action Handlers And Pending States — React 19 & Modern Component Architecture
- Suspense Architecture: Promises, Fallbacks, And Co-ordination — React 19 & Modern Component Architecture