install
source · Clone the upstream repo
git clone https://github.com/Intense-Visions/harness-engineering
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/Intense-Visions/harness-engineering "$T" && mkdir -p ~/.claude/skills && cp -r "$T/agents/skills/codex/react-concurrent-ui" ~/.claude/skills/intense-visions-harness-engineering-react-concurrent-ui-e14292 && rm -rf "$T"
manifest:
agents/skills/codex/react-concurrent-ui/SKILL.mdsource content
React Concurrent UI
Build responsive UIs using React 18 concurrent features and transitions
When to Use
- UI becomes unresponsive during expensive state updates (search filtering, large list rendering)
- You want to show stale content while new content loads instead of a spinner
- Input feels laggy because rendering a derived list blocks the keystroke handler
- Using React 18+ with
createRoot
Instructions
- Use
to mark non-urgent state updates:startTransitionconst [isPending, startTransition] = useTransition(); startTransition(() => setQuery(input)); - Use
to defer an expensive derived computation:useDeferredValueconst deferredQuery = useDeferredValue(query); const filteredList = useMemo(() => filter(list, deferredQuery), [list, deferredQuery]); - Show
as a subtle loading indicator (opacity, spinner overlay) — not a full Suspense fallback.isPending - Ensure the app is mounted with
(required for concurrent features).createRoot - 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.
vs startTransition
:useDeferredValue
: you control when the update is marked as non-urgent (around thestartTransition
call)setState
: you defer a derived value (useful when you cannot wrap the setter)useDeferredValue
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.
Source
https://patterns.dev/react/concurrent-pattern
Process
- 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.