Skip to content
Back to skills

React 2026

ASecurity

> Modern React patterns for 2025-2026 including React 19, Compiler, and AI-integrated UI

  • 20 stars
  • 0 votes
  • 0 copies
  • 8 views
  • Added September 11, 2026
developmenttypescriptreactrefactoringapi

Works with

  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 2 files and shows the line behind each finding

Scanned September 11, 2026

npx -y skills add Intense-Visions/harness-engineering --skill react-2026 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of React 2026?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for React 2026
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/intense-visions-react-2026/badge)](https://www.skillsdirectory.com/skills/intense-visions-react-2026)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# 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:**

1. **React Compiler (beta to stable):** Automatically memoizes components. Remove manual `React.memo`, `useMemo`, `useCallback` where safe. Install `babel-plugin-react-compiler`.

2. **`use()` hook:** Read promises and context inside render — can be used conditionally:

   ```typescript
   function UserProfile({ userPromise }: { userPromise: Promise<User> }) {
     const user = use(userPromise); // suspends until resolved
     return <div>{user.name}</div>;
   }
   ```

3. **Server Actions:** Functions marked `'use server'` can be called from client components as async functions — replaces form submission API routes:

   ```typescript
   'use server';
   async function updateProfile(formData: FormData) {
     await db.users.update({ name: formData.get('name') });
   }
   ```

4. **`useFormStatus` and `useOptimistic`:** Built-in hooks for form state and optimistic UI updates.

5. **`ref` as prop:** No more `forwardRef` — pass `ref` directly as a regular prop in React 19.

## Details

**React Compiler adoption path:**

- Install: `npm install babel-plugin-react-compiler`
- Enable in Babel/Vite config
- Run `react-compiler-healthcheck` to identify files that need refactoring
- Remove manual memoization incrementally as you verify compiler output

**AI-integrated UI patterns:**

- Use `useOptimistic` for streaming AI responses
- Pair Server Actions with `startTransition` for non-blocking AI calls
- Stream AI output via the Vercel AI SDK (`useChat`, `useCompletion`) which wraps `ReadableStream` in React-friendly hooks
- Progressive enhancement: render static content server-side, enhance with streaming AI client-side

**React 19 migration notes:**

- `ReactDOM.render` removed — use `createRoot`
- `defaultProps` for function components removed — use default parameter values
- `string` refs removed — use callback refs or `useRef`
- 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 `use()` over `useEffect` + state for async data

## Source

https://patterns.dev/react/react-2026

## Process

1. Read the instructions and examples in this document.
2. Apply the patterns to your implementation, adapting to your specific context.
3. 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.

Files in this skill

  • SKILL.md3.1 KB
  • skill.yaml728 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.