Skip to content

Move to React 19 - #246

Merged
rouges78 merged 1 commit into
mainfrom
chore/react-19
Nov 23, 2026
Merged

rouges78 merged 1 commit into
mainfrom
chore/react-19

Conversation

@rouges78

Copy link
Copy Markdown
Owner

What changed

Replaces Dependabot's #238, which bumped react and @types/react alone and could not install: npm ci failed with ERESOLVE because @types/react-dom 18 requires @types/react 18, which also broke frontend-checks and npm audit + SBOM.

  • Packages: react and react-dom 19.3.1 (published 2026-10-14), @types/react 19.3.0 (pinned exactly, as 18.2.22 was) and @types/react-dom 19.3.0 (2026-09-09). Next 15 accepts React 19. The lockfile also moves scheduler to 0.28.0 and fast-equals to 5.4.5, and drops @types/prop-types and @types/scheduler.
  • csstype held at 3.2.3: npm picked 3.2.4, which is six days old; @types/react only needs ^3.2.2, so the lockfile entry was set to the year-old 3.2.3.
  • react-day-picker removed: it was the only dependency whose peer range stops at React 18. Its only user, components/ui/calendar.tsx, is imported nowhere and was already listed in scripts/.dead-modules-baseline.json, so the component, the dependency and the baseline entry go, rather than porting an unused component to v9.
  • Type fixes: useRef now needs an initial value (components/ui/alphabet-background.tsx, hooks/use-batch-operations.ts); ErrorInfo.componentStack can be null (lib/error-handler.ts). Types are unchanged otherwise.

None of the APIs React 19 removed is used: defaultProps on function components, propTypes, findDOMNode, ReactDOM.render/hydrate, string refs, legacy context, react-dom/test-utils. forwardRef (77 uses) still works in 19.

Checked

  • npm ci installs with no peer conflict; no installed package has a React peer range that excludes 19.
  • npm run typecheck, npm run lint (no errors), npm run i18n:check, npm run dead:check.
  • vitest run: 1248 passed.
  • npm run build (production) succeeds.
  • Dev server in the browser: the profile picker renders, the create-profile dialog (Radix) opens, a controlled input and the language switch re-render it, Cancel closes it; no console errors in a fresh tab.

Not checked

The rest of the app sits behind the profile picker, and profiles need Tauri commands that do not run in a plain browser. Worth a pass in npm run tauri:dev before merging: library, a translation run, the editor.

🤖 Generated with Claude Code

Dependabot's #238 bumped react and @types/react alone, so npm ci failed
with ERESOLVE: @types/react-dom 18 needs @types/react 18. This takes the
whole set together:

- react and react-dom 19.3.1 (published 2026-10-14), @types/react
  19.3.0 and @types/react-dom 19.3.0 (2026-09-09). Next 15 accepts
  React 19.
- csstype is held at 3.2.3 in the lockfile: npm picked 3.2.4, which is
  six days old, and @types/react only needs ^3.2.2.
- react-day-picker 8 was the one dependency whose peer range stops at
  React 18. Its only user, components/ui/calendar.tsx, is imported
  nowhere and was already listed as dead in the dead-modules baseline,
  so both go instead of porting an unused component to v9.
- Three type changes in React 19: useRef now needs an initial value
  (alphabet-background, use-batch-operations) and
  ErrorInfo.componentStack can be null (error-handler).

No removed React 19 API (defaultProps on function components,
propTypes, findDOMNode, ReactDOM.render, string refs, legacy context,
react-dom/test-utils) is used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rouges78
rouges78 merged commit 5363b3e into main Nov 23, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant