Show isPending as a subtle loading indicator (opacity, spinner overlay) — not a full Suspense fallback.
Ensure the app is mounted with createRoot (required for concurrent features).
Do not use transitions for urgent updates (text input value, toggle state that affects the input itself).
Details
Concurrent React can interrupt, pause, and resume renders. startTransition and useDeferredValue are the primary APIs for leveraging this.
startTransition vs useDeferredValue:
startTransition: you control when the update is marked as non-urgent (around the setState call)
useDeferredValue: you defer a derived value (useful when you cannot wrap the setter)
What makes an update "concurrent": React can abandon an in-progress render if a higher-priority update arrives (e.g., user keypress). This only happens for transitions.
React 18 migration: Opt in by replacing ReactDOM.render with createRoot. Strict Mode in React 18 mounts components twice in development to surface side effects.
Read the instructions and examples in this document.
Apply the patterns to your implementation, adapting to your specific context.
Verify your implementation against the details and edge cases listed above.
Harness Integration
Type: knowledge — this skill is a reference document, not a procedural workflow.
No tools or state — consumed as context by other skills and agents.
Success Criteria
The patterns described in this document are applied correctly in the implementation.
Edge cases and anti-patterns listed in this document are avoided.
1---2name: react-concurrent-ui3description: React Concurrent UI4---5# React Concurrent UI67> Build responsive UIs using React 18 concurrent features and transitions89## When to Use1011- UI becomes unresponsive during expensive state updates (search filtering, large list rendering)12- You want to show stale content while new content loads instead of a spinner13- Input feels laggy because rendering a derived list blocks the keystroke handler14- Using React 18+ with `createRoot`1516## Instructions17181. Use `startTransition` to mark non-urgent state updates:19 ```typescript20 const [isPending, startTransition] = useTransition();21 startTransition(() => setQuery(input));22 ```232. Use `useDeferredValue` to defer an expensive derived computation:24 ```typescript25 const deferredQuery = useDeferredValue(query);26 const filteredList = useMemo(() => filter(list, deferredQuery), [list, deferredQuery]);27 ```283. Show `isPending` as a subtle loading indicator (opacity, spinner overlay) — not a full Suspense fallback.294. Ensure the app is mounted with `createRoot` (required for concurrent features).305. Do not use transitions for urgent updates (text input value, toggle state that affects the input itself).3132## Details3334Concurrent React can interrupt, pause, and resume renders. `startTransition` and `useDeferredValue` are the primary APIs for leveraging this.3536**`startTransition` vs `useDeferredValue`:**3738- `startTransition`: you control when the update is marked as non-urgent (around the `setState` call)39- `useDeferredValue`: you defer a derived value (useful when you cannot wrap the setter)4041**What makes an update "concurrent":** React can abandon an in-progress render if a higher-priority update arrives (e.g., user keypress). This only happens for transitions.4243**React 18 migration:** Opt in by replacing `ReactDOM.render` with `createRoot`. Strict Mode in React 18 mounts components twice in development to surface side effects.4445## Source4647https://patterns.dev/react/concurrent-pattern4849## Process50511. Read the instructions and examples in this document.522. Apply the patterns to your implementation, adapting to your specific context.533. Verify your implementation against the details and edge cases listed above.5455## Harness Integration5657- **Type:** knowledge — this skill is a reference document, not a procedural workflow.58- **No tools or state** — consumed as context by other skills and agents.5960## Success Criteria6162- The patterns described in this document are applied correctly in the implementation.63- Edge cases and anti-patterns listed in this document are avoided.
Run npx skillmds@latest add intense-visions/react-concurrent-ui in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
React Concurrent UI It is listed under Web & Frontend on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Intense-Visions (@intense-visions) published this skill. Their other Agent Skills are listed on their SkillMD profile.