-
-
Notifications
You must be signed in to change notification settings - Fork 631
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
Remaining React 18 changes #1464
Comments
@tomdracz Is there anything else we need to change for React 18 that I've missed? |
@tomdracz And to fix point 1, do you know if it will be enough to store the roots on |
@alexeyr-ci1, @tomdracz should I push a release? |
@justin808 @pulkitkkr's #1455 is almost ready, and I think we'll want a release including it. So I suggest waiting until it's done and making the release after. |
Think that covers it!
Not entirely sure on this one but I would expect |
@alexeyr-ci1 should I push a new version? or wait? Please check the changelog to see if it's current. |
It's actually only used with Turbo, we really need integration tests for it. Added #1468. @tomdracz Actually, do you know if it should be called on non-Turbo page unload? |
I still think to wait for #1455, unless you want it ASAP. The changelog does need to be updated, but let me do the Popmenu PR first and I'll come back to it. |
@justin808 Updated the changelog. |
I think there's no need. Non Turbo stuff will just reload the page so we should get fresh mounts on new page. Haven't dug into gem internals so that's just an educated guess |
@alexeyr-ci1 Should I push a release with React 18 support? We'll also have #1455 hopefully. |
Any updates on release? Is it available in npm? |
I'm pretty sure this was fixed a long time ago. |
Currently,
unmount
inclientStartup.ts
doesreact_on_rails/node_package/src/clientStartup.ts
Line 216 in fa2fe25
With the new Root API, it should be replaced by
root.unmount()
, which means we need to store rendered roots. The current approach will not work due to https://github.com/facebook/react/blob/2e0d86d22192ff0b13b71b4ad68fea46bf523ef6/packages/react-dom/src/client/ReactDOMLegacy.js#L391-L401:We should add tests which cover this. (Fix unmounting in React 18 #1466)
Clarify situation with multiple roots and if we should use
createPortal
instead. See the discussion starting with React 18 conditional support #1449 (comment). Also notein https://reactjs.org/docs/react-dom-client.html#createroot (the same option is available for
hydrateRoot
).Update places in docs which still use
ReactDOM.render
.Look if we want any changes based on React Router v6.
The text was updated successfully, but these errors were encountered: