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

Remaining React 18 changes #1464

Closed
1 of 4 tasks
alexeyr-ci1 opened this issue Jun 27, 2022 · 13 comments
Closed
1 of 4 tasks

Remaining React 18 changes #1464

alexeyr-ci1 opened this issue Jun 27, 2022 · 13 comments

Comments

@alexeyr-ci1
Copy link
Contributor

alexeyr-ci1 commented Jun 27, 2022

@alexeyr-ci1
Copy link
Contributor Author

@tomdracz Is there anything else we need to change for React 18 that I've missed?

@alexeyr-ci1
Copy link
Contributor Author

@tomdracz And to fix point 1, do you know if it will be enough to store the roots on findContext() when rendering, or can we get different instances of window/global between reactOnRailsPageLoaded and reactOnRailsPageUnloaded?

@justin808
Copy link
Member

@alexeyr-ci1, @tomdracz should I push a release?

@alexeyr-ci1
Copy link
Contributor Author

@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.

@tomdracz
Copy link
Contributor

tomdracz commented Jul 7, 2022

@tomdracz Is there anything else we need to change for React 18 that I've missed?

Think that covers it!

@tomdracz And to fix point 1, do you know if it will be enough to store the roots on findContext() when rendering, or can we get different instances of window/global between reactOnRailsPageLoaded and reactOnRailsPageUnloaded?

Not entirely sure on this one but I would expect window/global to be consistent between the two calls. No idea what happens if you bring Turbo to the mix though

@justin808
Copy link
Member

@alexeyr-ci1 should I push a new version? or wait? Please check the changelog to see if it's current.

@alexeyr-ci1
Copy link
Contributor Author

alexeyr-ci1 commented Jul 7, 2022

Not entirely sure on this one but I would expect window/global to be consistent between the two calls. No idea what happens if you bring Turbo to the mix though

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?

@alexeyr-ci1
Copy link
Contributor Author

@alexeyr-ci1 should I push a new version? or wait? Please check the changelog to see if it's current.

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.

@alexeyr-ci1
Copy link
Contributor Author

@justin808 Updated the changelog.

@tomdracz
Copy link
Contributor

tomdracz commented Jul 7, 2022

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 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

@justin808
Copy link
Member

@alexeyr-ci1 Should I push a release with React 18 support? We'll also have #1455 hopefully.

@georgii-ivanov
Copy link

Any updates on release? Is it available in npm?

@justin808
Copy link
Member

I'm pretty sure this was fixed a long time ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants