Catalog
github/react19-concurrent-patterns

github

react19-concurrent-patterns

Preserve React 18 concurrent patterns and adopt React 19 APIs (useTransition, useDeferredValue, Suspense, use(), useOptimistic, Actions) during migration.

v1.0Latest
New~708Updated Jun 26, 2026

React 19 Concurrent Patterns

React 19 introduced new APIs that complement the migration work. This skill covers two concerns:

  1. Preserve existing React 18 concurrent patterns that must not be broken during migration
  2. Adopt new React 19 APIs worth introducing after migration stabilizes

Part 1 Preserve: React 18 Concurrent Patterns That Must Survive the Migration

These patterns exist in React 18 codebases and must not be accidentally removed or broken:

createRoot Already Migrated by the R18 Orchestra

If the R18 orchestra already ran, ReactDOM.rendercreateRoot is done. Verify it's correct:

// CORRECT React 19 root (same as React 18):
import { createRoot } from 'react-dom/client';
const root = createRoot(document.getElementById('root'));
root.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>
);

useTransition No Migration Needed

useTransition from React 18 works identically in React 19. Do not touch these patterns during migration:

// React 18 useTransition  unchanged in React 19:
const [isPending, startTransition] = useTransition();

function handleClick() {
  startTransition(() => {
    setFilteredResults(computeExpensiveFilter(input));
  });
}

useDeferredValue No Migration Needed

// React 18 useDeferredValue  unchanged in React 19:
const deferredQuery = useDeferredValue(query);

Suspense for Code Splitting No Migration Needed

// React 18 Suspense with lazy  unchanged in React 19:
const LazyComponent = React.lazy(() => import('./LazyComponent'));

function App() {
  return (
    <Suspense fallback={<Spinner />}>
      <LazyComponent />
    </Suspense>
  );
}

Part 2 React 19 New APIs

These are worth adopting in a post-migration cleanup sprint. Do not introduce these DURING the migration stabilize first.

For full patterns on each new API, read:

  • references/react19-use.md the use() hook for promises and context
  • references/react19-actions.md Actions, useActionState, useFormStatus, useOptimistic
  • references/react19-suspense.md Suspense for data fetching (the new pattern)

Migration Safety Rules

During the React 19 migration itself, these concurrent-mode patterns must be left completely untouched:

# Verify nothing touched these during migration:
grep -rn "useTransition\|useDeferredValue\|Suspense\|startTransition" \
  src/ --include="*.js" --include="*.jsx" | grep -v "\.test\."

If the migrator touched any of these files, review the changes the migration should only have modified React API surface (forwardRef, defaultProps, etc.), never concurrent mode logic.

Files4
4 files · 23.0 KB

Select a file to preview

Overall Score

88/100

Grade

A

Excellent

Safety

90

Quality

87

Clarity

88

Completeness

86

Summary

This skill documents React 19 concurrent patterns and new APIs (use(), useActionState, useOptimistic, Suspense for data fetching) for developers migrating from React 18. It separates preservation of existing concurrent patterns during migration from adoption of new APIs in a post-stabilization phase, with detailed reference documentation and practical examples for each pattern.

Detected Capabilities

code analysis via greppattern identificationcode documentation and examples

Trigger Keywords

Phrases that MCP clients use to match this skill to user intent.

react 19 migrationconcurrent patternsuse hookuseActionStateuseOptimisticsuspense data fetchingreact 18 to 19

Use Cases

  • Migrate React 18 app to React 19 while preserving concurrent patterns
  • Adopt React 19 use() hook for cleaner async data patterns
  • Convert useReducer+async forms to useActionState
  • Implement optimistic UI updates with useOptimistic
  • Plan Suspense data fetching refactor after React 19 stabilizes

Quality Notes

  • Well-structured skill with clear phase separation (preserve vs. adopt, migration vs. post-migration)
  • Comprehensive reference documentation with React 18 → React 19 comparisons for all major APIs
  • Practical code examples showing before/after patterns and refactoring targets
  • Clear warnings about preview/experimental features (Suspense data fetching)
  • Migration strategy is phased and cautious — avoids pushing changes during initial stabilization
  • Grep commands provided for identifying refactoring candidates in existing codebases
  • Limitations clearly documented for each API (e.g., use() with complex dependencies, Suspense SSR limits)
  • Good coverage of error handling patterns (Error Boundary integration, useOptimistic rollback)
  • Supporting reference files are well-organized and comprehensive
Model: claude-haiku-4-5-20251001Analyzed: Jun 26, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Use github/react19-concurrent-patterns in your dev environment

Command Palette

Search for a command to run...

github/react19-concurrent-patterns | SkillRepo