Skip to content

Bump to React 19 (deps + peer range)#4417

Draft
lbwexler wants to merge 2 commits into
react-19from
react-19-upgrade
Draft

Bump to React 19 (deps + peer range)#4417
lbwexler wants to merge 2 commits into
react-19from
react-19-upgrade

Conversation

@lbwexler

@lbwexler lbwexler commented Jun 7, 2026

Copy link
Copy Markdown
Member

Stacked on the react-19 prep branch. Completes the React 19 upgrade with the dependency bump and peer-range widening.

Changes

  • Bumps react/react-dom (dev) and @types/react/@types/react-dom to 19.
  • Widens the react/react-dom peer range to ~18.2.0 || ^19.0.0.
  • Applies the forward-compatible @types/react@19 type-prep fixes (all compile and lint clean under @types/react@18 and behave identically on React 18):
    • useRef<HTMLDivElement>(null) explicit initial arg (DynamicTabSwitcher)
    • cast element props access, now unknown under @types 19 (DashCanvasWidgetChooser)
    • type cloneElement child as ReactElement<any> (UseHotkeys, UseContextMenu)
    • wrap async ref handler to return void (CodeInput)
    • narrow render-fn results to ReactElement (Column editor, Scroller content)

Verified: tsc + eslint clean under both @types/react@18 and @types/react@19.

lbwexler added 2 commits June 7, 2026 15:26
Moves the @types/react@19 code fixes (the non-dependency portion of the
React 19 upgrade) onto this prep branch, since all are forward-compatible -
they compile and lint clean under @types/react@18 and behave identically on
React 18:

- useRef<HTMLDivElement>(null) explicit initial arg (DynamicTabSwitcher)
- cast element props access, now 'unknown' under @types 19 (DashCanvasWidgetChooser)
- type cloneElement child as ReactElement<any> (UseHotkeys, UseContextMenu)
- wrap async ref handler to return void (CodeInput)
- narrow render-fn results to ReactElement (Column editor, Scroller content)

Verified: tsc + eslint clean under @types/react@18.
Bumps react/react-dom (dev) and @types/react/@types/react-dom to 19, widens
the react/react-dom peer range to '~18.2.0 || ^19.0.0', and notes React 19
support in the changelog.

The forward-compatible code fixes this upgrade requires now live on the
react-19 prep branch (this branch is stacked on it), so this commit is the
dependency bump alone. tsc clean under @types/react@19.
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