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-2026" ~/.claude/skills/intense-visions-harness-engineering-react-2026-27f8b2 && rm -rf "$T"
manifest:
agents/skills/codex/react-2026/SKILL.mdsource content
React 2026
Modern React patterns for 2025-2026 including React 19, Compiler, and AI-integrated UI
When to Use
- Starting a new React project in 2025 or later
- Upgrading an existing React 18 project to React 19
- Evaluating whether to adopt the React Compiler
- Building AI-powered UI features with streaming and progressive enhancement
Instructions
React 19 key changes:
-
React Compiler (beta to stable): Automatically memoizes components. Remove manual
,React.memo
,useMemo
where safe. InstalluseCallback
.babel-plugin-react-compiler -
hook: Read promises and context inside render — can be used conditionally:use()function UserProfile({ userPromise }: { userPromise: Promise<User> }) { const user = use(userPromise); // suspends until resolved return <div>{user.name}</div>; } -
Server Actions: Functions marked
can be called from client components as async functions — replaces form submission API routes:'use server''use server'; async function updateProfile(formData: FormData) { await db.users.update({ name: formData.get('name') }); } -
anduseFormStatus
: Built-in hooks for form state and optimistic UI updates.useOptimistic -
as prop: No moreref
— passforwardRef
directly as a regular prop in React 19.ref
Details
React Compiler adoption path:
- Install:
npm install babel-plugin-react-compiler - Enable in Babel/Vite config
- Run
to identify files that need refactoringreact-compiler-healthcheck - Remove manual memoization incrementally as you verify compiler output
AI-integrated UI patterns:
- Use
for streaming AI responsesuseOptimistic - Pair Server Actions with
for non-blocking AI callsstartTransition - Stream AI output via the Vercel AI SDK (
,useChat
) which wrapsuseCompletion
in React-friendly hooksReadableStream - Progressive enhancement: render static content server-side, enhance with streaming AI client-side
React 19 migration notes:
removed — useReactDOM.rendercreateRoot
for function components removed — use default parameter valuesdefaultProps
refs removed — use callback refs orstringuseRef- Concurrent features now enabled by default with
createRoot
Forward compatibility:
- Write components as async Server Components where possible — they compose forward into RSC-first architectures
- Prefer
overuse()
+ state for async datauseEffect
Source
https://patterns.dev/react/react-2026
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.