Source: Context7 librariesDocumentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
/reactjs/react.dev, /facebook/react.Use: Embed as “Research Brief” in PF-76 spec.
Official upgrade path and prerequisites
- Upgrade to React 18.3 first. React 18.3 adds warnings for deprecated APIs and aligns behavior needed for React 19. (Ref: React 19 Upgrade Guide, React 18.3 release notes in CHANGELOG.)
- This repo: Already on
react@^18.3.1,react-dom@^18.3.1;src/main.tsxusescreateRootfromreact-dom/client. No legacyReactDOM.renderorhydratein app code.
Confirmed breaking / removed APIs
| API | Status | Migration |
|---|---|---|
ReactDOM.render | Removed in React 19 | Use createRoot from react-dom/client (already in use). |
ReactDOM.hydrate | Removed in React 19 | Use hydrateRoot from react-dom/client if SSR. |
act from react-dom/test-utils | Moved/removed | Import act from react. Other test-utils removed. |
| String refs | Deprecated/removed | Use ref callbacks or useRef. Codemod: replace-string-ref. |
Required codemods and tools
- Full migration recipe:
npx codemod@latest react/19/migration-recipe
(Runs replace-reactdom-render, replace-string-ref, replace-act-import, etc.) - Individual codemods:
npx codemod@latest react/19/replace-reactdom-render— render/hydrate → createRoot/hydrateRootnpx codemod@latest react/19/replace-act-import— act from react-dom/test-utils → reactnpx codemod@latest react/19/replace-string-ref— string refs → callback refs
Repo compatibility notes
- Entry:
src/main.tsxalready usescreateRoot; no change needed for root API. - Tests: Use
@testing-library/react;actis typically used via Testing Library. Verify no directimport { act } from 'react-dom/test-utils'; if any, switch toimport { act } from 'react'or rely on RTL’s built-in act. - Peers to verify before/after bump:
@gusto/embedded-react-sdk,react-dropzone,teller-connect-react(transitive react-script-hook),@xyflow/react,@tiptap/react,react-pdf,react-plaid-link,react-router-dom,@radix-ui/*,next-themes,recharts,vaul.
Runnpm installafter bump and fix peer warnings; smoke-test Gusto embed, Plaid, PDF viewer, and route-heavy flows. - React Compiler: If adopted later, some third-party APIs may be “known incompatible” and skip memoization; document and test.
Recommended rollout and rollback
- Pre-step: Ensure 18.3.x latest patch; run
npx codemod@latest react/19/migration-recipein dry-run or with review. - Bump: Upgrade
react,react-dom,@types/react,@types/react-domto 19.x;npm install. - Fix: Resolve type and peer issues; replace any remaining
react-dom/test-utilsact usage. - Validate:
npm run validateandnpm run test:baseline; manual smoke of Gusto, Plaid, PDF, navigation. - Rollback: Revert package.json and lockfile to 18.3.x; re-run
npm installand full validate.