Skip to content

refactor(deps): migrate react-dom from v18.2.0 to v19.2.4#6712

Closed
digital-wizard48 wants to merge 1 commit intoChatGPTNextWeb:mainfrom
digital-wizard48:deps/upgrade-react-dom-19.2.4
Closed

refactor(deps): migrate react-dom from v18.2.0 to v19.2.4#6712
digital-wizard48 wants to merge 1 commit intoChatGPTNextWeb:mainfrom
digital-wizard48:deps/upgrade-react-dom-19.2.4

Conversation

@digital-wizard48
Copy link

Changes

Dependency version bumps

  • react: ^18.2.0^19.2.4 (peer dependency, must be upgraded together with react-dom)
  • react-dom: ^18.2.0^19.2.4
  • @types/react: ^18.2.70^19.0.0 (type definitions for React 19)
  • @types/react-dom: ^18.2.7^19.0.0 (type definitions for React 19)

Breaking change: JSX.Element removed from global namespace

React 19 removes the global JSX namespace (and thus JSX.Element). All usages in app/components/ui-lib.tsx have been replaced with React.ReactElement, which is the explicit equivalent and the recommended approach going forward:

  • Popover.children prop: JSX.ElementReact.ReactElement
  • Popover.content prop: JSX.ElementReact.ReactElement
  • Card.children prop: JSX.Element[]React.ReactElement[]
  • ListItem.icon prop: JSX.ElementReact.ReactElement

No changes needed for createRoot

The createRoot API imported from react-dom/client is unchanged in React 19 and continues to work as before.

Notes

  • Run yarn after merging to install the updated packages.
  • If other files in the project use JSX.Element (not shown here), they will also need the same JSX.ElementReact.ReactElement substitution.
  • React 19 also deprecates ReactDOM.render (the legacy root API), but this codebase already uses createRoot exclusively, so no migration is needed there.

This PR was auto-generated by Gittensor upgrade bot using Claude AI

@digital-wizard48
Copy link
Author

Closing this PR — CI checks are failing and automated fixes have been exhausted. Thank you for considering this contribution.

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.

2 participants