skills/react19-source-patterns/SKILL.md
Reference for React 19 source-file migration patterns, including API changes, ref handling, and context updates.
npx skillsauth add williamlimasilva/.copilot react19-source-patternsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Reference for every source-file migration required for React 19.
| 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 |
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.
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.
tools
Create a new workshop or use an existing directory as one. Handles two paths: (A) use an existing local directory the operator points at, or (B) create a new private GitHub repo in the signed-in account. Never creates a repo inside another repo.
development
Guide for setting up vcpkg in C++ projects, managing dependency versions, and cross-compiling. Covers manifest initialization, CMake and Visual Studio integration, classic-to-manifest migration, version pinning, baselines, overrides, triplets, and cross-compilation. Use when a user is working with vcpkg project setup, installation, version management, or cross-platform builds. For specialized tasks, additional references cover custom registries and overlay ports (references/registries.md), CI/CD and binary caching (references/ci.md), and troubleshooting and dependency lifecycle (references/troubleshooting.md).
testing
Emit structured agent signals — hands-up, blocked, done, checkpoint, partnership. Signals are written as JSON to .signals/ for dashboard consumption and noted in the journal for persistence.
development
Install and configure Markstream streaming Markdown renderers for Vue, React, Svelte, Angular, Nuxt, and Vue 2 applications. Use for package selection, minimal peer dependencies, CSS order, SSR boundaries, streaming mode, and renderer setup.