Skip to content
Back to skills

Official Github React19 Source Patterns

ASecurity

Reference for React 19 source-file migration patterns, including API changes, ref handling, and context updates.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 24, 2026
documentationreactnodeapidocumentation

Works with

  • api

Security analysis

A100/100

Scanned November 24, 2026

npx -y skills add iDorgham/Workspace-Factory --skill official_github_react19_source_patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Official Github React19 Source Patterns?

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

Security grade badge for Official Github React19 Source Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/idorgham-official-github-react19-source-patterns/badge)](https://www.skillsdirectory.com/skills/idorgham-official-github-react19-source-patterns)

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
---
name: react19-source-patterns
description: 'Reference for React 19 source-file migration patterns, including API changes, ref handling, and context updates.'
---

# React 19 Source Migration Patterns

Reference for every source-file migration required for React 19.

## Quick Reference Table

| Pattern | Action | Reference |
|---|---|---|
| `ReactDOM.render(...)` | → `createRoot().render()` | See references/api_migrations.md |
| `ReactDOM.hydrate(...)` | → `hydrateRoot(...)` | See references/api_migrations.md |
| `unmountComponentAtNode` | → `root.unmount()` | Inline fix |
| `ReactDOM.findDOMNode` | → direct ref | Inline fix |
| `forwardRef(...)` wrapper | → ref as direct prop | See references/api_migrations.md |
| `Component.defaultProps = {}` | → ES6 default params | See references/api_migrations.md |
| `useRef()` no arg | → `useRef(null)` | Inline fix  add `null` |
| Legacy Context | → `createContext` | → api_migrations.md#legacy-context (`references/api_migrations.md#legacy-context`) |
| String refs `this.refs.x` | → `createRef()` | → api_migrations.md#string-refs (`references/api_migrations.md#string-refs`) |
| `import React from 'react'` (unused) | Remove | Only if no `React.` usage in file |

## PropTypes Rule

Do **not** remove `.propTypes` assignments. The `prop-types` package still works as a standalone validator. React 19 only removes the built-in runtime checking from the React package  the package itself remains valid.

Add this comment above any `.propTypes` block:
```jsx
// NOTE: React 19 no longer runs propTypes validation at runtime.
// PropTypes kept for documentation and IDE tooling only.
```

## Read the Reference

For full before/after code for each migration, read **`references/api_migrations.md`**. It contains the complete patterns including edge cases for `forwardRef` with `useImperativeHandle`, `defaultProps` null vs undefined behavior, and legacy context provider/consumer cross-file migrations.

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.

View all in documentation →

Comments

Loading comments…

Newsletter

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