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
related skills
semantically similar in the cross-vendor index
don't have the plugin yet? install it then click "run inline in claude" again.
+quick reference table format is scannable and directly maps old pattern to new equivalent with minimal cognitive load.
+covers major api discontinuities (render lifecycle, ref handling, context, defaultprops) in one place.
weaknesses
~no actionable steps, decision logic, or success/failure criteria - this is a lookup table masquerading as a skill, not a procedure.
~missing edge cases: codemod safety (what if forwardref has custom logic?), coexistence scenarios (gradual migration), breaking changes in component tree behavior, and testing verification steps after migration.