Labsco
github logo

react19-source-patterns

✓ Official36,200

by github · part of github/awesome-copilot

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

🔥🔥🔥✓ VerifiedFreeQuick setup
🧩 One of 7 skills in the github/awesome-copilot package — works on its own, and pairs well with its siblings.

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

Inspect the full instructions your agent will receiveExpand

This is the exact playbook injected into your agent when the skill activates — shown here so you can audit it before installing. You don't need to read it to use the skill.

by github

Reference for React 19 source-file migration patterns, including API changes, ref handling, and context updates. npx skills add https://github.com/github/awesome-copilot --skill react19-source-patterns Download ZIPGitHub36.2k

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 unmountComponentAtNoderoot.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 String refs this.refs.xcreateRef() → 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:

Copy & paste — that's it
// 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.