Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to react 19 #4702

Merged
merged 8 commits into from
Dec 11, 2024
Merged

Update to react 19 #4702

merged 8 commits into from
Dec 11, 2024

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented Dec 6, 2024

Update to the newly released react 19

This would likely require a major version bump, which applies particularly to embedded users because we would no longer be compatible with react 17 or older

if we wanted to consider doing more breaking stuff, the removal of buffer could be combined with that major version bump

@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Dec 6, 2024

it looks like test failures are due to some issues with changes to the renderToString function. we use renderToString in the webworker

this is noted as a practice that is discouraged in the react docs, however, it is also quite fundamental to some of our approaches

https://react.dev/reference/react-dom/server/renderToString#removing-rendertostring-from-the-client-code

at the same time, this approach has also led to a lot of trouble with hydration mismatches, node.removeChild errors, and more. it could be that we rethink the approach of trying to use true "react server side rendering" on the web worker

@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Dec 6, 2024

note that the motivation, aside from staying up to date, is that currently e.g. embedded users or anyone cannot even use react 19 at all due to our importing of older React api's "hydrate/render" vs "hydrateRoot/createRoot", the older api's were removed in react 19

@cmdcolin cmdcolin marked this pull request as draft December 6, 2024 19:03
@cmdcolin cmdcolin force-pushed the react19 branch 5 times, most recently from fd320f5 to fba6860 Compare December 11, 2024 05:13
Lints

Stillg

More bumps

Add messagechannel polyfill for jest

MessageChannel polyfill

Misc

Main thread

Testing react 19

Misc

Fix tsc error on jest config
@cmdcolin cmdcolin force-pushed the react19 branch 4 times, most recently from 6c406fc to 6e0f9d3 Compare December 11, 2024 16:41
@cmdcolin cmdcolin marked this pull request as ready for review December 11, 2024 23:46
@cmdcolin cmdcolin merged commit 80ba96f into main Dec 11, 2024
4 checks passed
@cmdcolin cmdcolin deleted the react19 branch December 11, 2024 23:48
@cmdcolin cmdcolin added enhancement New feature or request internal breaking and removed enhancement New feature or request internal labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant