Index of every page on this site: llms.txt
All skills
github avatar

/react19-concurrent-patterns

@f10fdb8 official
by githubgithub/awesome-copilot42k stars
5,426
Run it yourself

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

Use this Skill: https://skilld.dev/gh/github/awesome-copilot/react19-concurrent-patterns

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈46 tokens for metadata: the name and description. ≈669 when used: this file. ≈5.6k more on demand in 3 files.

Description uses 2.3% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈184 characters, or 2.3%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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.render → createRoot 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.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts18d4 checks · Risk SAFE
  • Gen Agent Trust Hub18d

    The skill provides documentation and code examples for migrating to React 19 concurrent patterns. It includes standard shell commands for searching local source code for specific React hook usage. No security issues were detected.

  • Socket2mo

    No alerts

  • Snyk18d

    Risk: LOW · No issues

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at f10fdb8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 7 months ago
  • React
  • react19
  • concurrent
  • utransition
  • usedeferredvalue
  • suspense
  • use-hook
  • actions
  • migration

README badge

README badge for github/awesome-copilot/react19-concurrent-patterns

Instructs Claude on which React 18 concurrent patterns to preserve during React 19 migration and which new React 19 APIs (use(), Actions, useOptimistic, Suspense for data) to adopt afterward. Covers useTransition, useDeferredValue, Suspense, createRoot, and verifies concurrent-mode logic remains untouched during the upgrade.

Generated from the current SKILL.md.

Does this skill cover the actual React 18 to React 19 migration?
No. This skill assumes the React 18 to React 19 migration (createRoot, API updates) is already done by another tool. It focuses on preserving existing concurrent patterns during migration and adopting new React 19 APIs afterward.
Should I adopt React 19 APIs like use() and useOptimistic during the migration?
No. The skill recommends stabilizing the migration first, then introducing new APIs in a separate cleanup sprint after the codebase is stable on React 19.
Do useTransition, useDeferredValue, and Suspense need changes for React 19?
No. These React 18 concurrent patterns work identically in React 19 and should not be touched during migration.
What new React 19 APIs does this skill cover?
The skill references use(), Actions, useActionState, useFormStatus, useOptimistic, and Suspense for data fetching as patterns worth adopting post-migration.

Generated from the current SKILL.md. These answers refresh after source changes.