Repository navigation
Move to React 19 - #246
Merged
Merged
Move to React 19#246
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Replaces Dependabot's #238, which bumped
reactand@types/reactalone and could not install:npm cifailed withERESOLVEbecause@types/react-dom18 requires@types/react18, which also brokefrontend-checksandnpm audit + SBOM.reactandreact-dom19.3.1 (published 2026-10-14),@types/react19.3.0 (pinned exactly, as 18.2.22 was) and@types/react-dom19.3.0 (2026-09-09). Next 15 accepts React 19. The lockfile also movesschedulerto 0.28.0 andfast-equalsto 5.4.5, and drops@types/prop-typesand@types/scheduler.@types/reactonly needs^3.2.2, so the lockfile entry was set to the year-old 3.2.3.components/ui/calendar.tsx, is imported nowhere and was already listed inscripts/.dead-modules-baseline.json, so the component, the dependency and the baseline entry go, rather than porting an unused component to v9.useRefnow needs an initial value (components/ui/alphabet-background.tsx,hooks/use-batch-operations.ts);ErrorInfo.componentStackcan benull(lib/error-handler.ts). Types are unchanged otherwise.None of the APIs React 19 removed is used:
defaultPropson function components,propTypes,findDOMNode,ReactDOM.render/hydrate, string refs, legacy context,react-dom/test-utils.forwardRef(77 uses) still works in 19.Checked
npm ciinstalls 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.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:devbefore merging: library, a translation run, the editor.🤖 Generated with Claude Code