react19-source-patterns

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

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "react19-source-patterns" with this command: npx skills add github/awesome-copilot/github-awesome-copilot-react19-source-patterns

React 19 Source Migration Patterns

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

Quick Reference Table

PatternActionReference
ReactDOM.render(...)createRoot().render()See references/api-migrations.md
ReactDOM.hydrate(...)hydrateRoot(...)See references/api-migrations.md
unmountComponentAtNoderoot.unmount()Inline fix
ReactDOM.findDOMNode→ direct refInline fix
forwardRef(...) wrapper→ ref as direct propSee references/api-migrations.md
Component.defaultProps = {}→ ES6 default paramsSee references/api-migrations.md
useRef() no arguseRef(null)Inline fix add null
Legacy ContextcreateContext→ api-migrations.md#legacy-context
String refs this.refs.xcreateRef()→ api-migrations.md#string-refs
import React from 'react' (unused)RemoveOnly 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:

// 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.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

git-commit

No summary provided by upstream source.

Repository SourceNeeds Review
23.6K-github
Coding

gh-cli

No summary provided by upstream source.

Repository SourceNeeds Review
17.5K-github
Coding

prd

No summary provided by upstream source.

Repository SourceNeeds Review
14.4K-github
Coding

documentation-writer

No summary provided by upstream source.

Repository SourceNeeds Review
14.3K-github