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-20263description: React 20264---5# React 202667> Modern React patterns for 2025-2026 including React 19, Compiler, and AI-integrated UI89## When to Use1011- Starting a new React project in 2025 or later12- Upgrading an existing React 18 project to React 1913- Evaluating whether to adopt the React Compiler14- Building AI-powered UI features with streaming and progressive enhancement1516## Instructions1718**React 19 key changes:**19201. **React Compiler (beta to stable):** Automatically memoizes components. Remove manual `React.memo`, `useMemo`, `useCallback` where safe. Install `babel-plugin-react-compiler`.21222. **`use()` hook:** Read promises and context inside render — can be used conditionally:2324 ```typescript25 function UserProfile({ userPromise }: { userPromise: Promise<User> }) {26 const user = use(userPromise); // suspends until resolved27 return <div>{user.name}</div>;28 }29 ```30313. **Server Actions:** Functions marked `'use server'` can be called from client components as async functions — replaces form submission API routes:3233 ```typescript34 'use server';35 async function updateProfile(formData: FormData) {36 await db.users.update({ name: formData.get('name') });37 }38 ```39404. **`useFormStatus` and `useOptimistic`:** Built-in hooks for form state and optimistic UI updates.41425. **`ref` as prop:** No more `forwardRef` — pass `ref` directly as a regular prop in React 19.4344## Details4546**React Compiler adoption path:**4748- Install: `npm install babel-plugin-react-compiler`49- Enable in Babel/Vite config50- Run `react-compiler-healthcheck` to identify files that need refactoring51- Remove manual memoization incrementally as you verify compiler output5253**AI-integrated UI patterns:**5455- Use `useOptimistic` for streaming AI responses56- Pair Server Actions with `startTransition` for non-blocking AI calls57- Stream AI output via the Vercel AI SDK (`useChat`, `useCompletion`) which wraps `ReadableStream` in React-friendly hooks58- Progressive enhancement: render static content server-side, enhance with streaming AI client-side5960**React 19 migration notes:**6162- `ReactDOM.render` removed — use `createRoot`63- `defaultProps` for function components removed — use default parameter values64- `string` refs removed — use callback refs or `useRef`65- Concurrent features now enabled by default with `createRoot`6667**Forward compatibility:**6869- Write components as async Server Components where possible — they compose forward into RSC-first architectures70- Prefer `use()` over `useEffect` + state for async data7172## Source7374https://patterns.dev/react/react-20267576## Process77781. Read the instructions and examples in this document.792. Apply the patterns to your implementation, adapting to your specific context.803. Verify your implementation against the details and edge cases listed above.8182## Harness Integration8384- **Type:** knowledge — this skill is a reference document, not a procedural workflow.85- **No tools or state** — consumed as context by other skills and agents.8687## Success Criteria8889- The patterns described in this document are applied correctly in the implementation.90- Edge cases and anti-patterns listed in this document are avoided.
Run npx skillmds@latest add intense-visions/react-2026 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 2026 It is listed under Web & Frontend on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. Capability flags: makes network calls. 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.