前端开发

react19-source-patterns

github/awesome-copilot

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

  • 969 次安装
  • 4.1万 星标
  • 收录于

安装命令

npx skills add https://github.com/github/awesome-copilot --skill react19-source-patterns

SKILL.md

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
String refs this.refs.x → createRef() → api-migrations.md#string-refs
import React from 'react' (unused) Remove Only if no React. usage in file