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
Upgrade to React 18 #15555
Upgrade to React 18 #15555
Conversation
I fixed almost all failing tests, but there a still a few I need help with. |
Won't all the hook tests need updating because |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## chore/react18 #15555 +/- ##
================================================
Coverage ? 47.55%
================================================
Files ? 447
Lines ? 15668
Branches ? 3342
================================================
Hits ? 7451
Misses ? 6818
Partials ? 1399
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
I refactored it, it was more than I thought. It would be great to get some feedback on this. 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As much as I would want React 18 in Strapi, I don't think it would be possible without causing problems with the community plugins. Many plugins use libraries that expect React ^17, running these with React 18 will create issues. I'm afraid we'll need to wait for Strapi v5 as this looks like a breaking change
I'd like to discuss more about this – react 18 is backwards compatible with react 17 assuming you're not using strict mode, which we're not? So why do you think updating to react 18 would cause these breaking changes? 🤔 If anything it would only cause potential install errors with npm without |
We are using a react 18 resolution in our package.json for several months now and we never encountered an compatibility issue. |
Hey @sapkra sorry for the radio silence on this one, some good news, as you can see i've updated this branch and sorted out a bunch of stuff in relation to updates in the main branch and i'm going to merge this to an internal branch so i can do an experimental release for outside testing to investigate potential issues that could occur with our ecosystem. |
Yeah I do think we need to heavily test this against many community plugins before we consider merging. This could cause a metric ton of problems if we miss something. Might also be good to run an extended beta here too for a few months and let people who are currently building plugins test against it also. Also doesn't react 18 default to SSR instead of CSR? Have we tested building and ejecting the admin away from the koa instance? Likewise if it's SSR we may have an increase in resource usage on the server and may impact our min/recommend RAM needs too. |
I'll prep a document this morning for internal viewing.
No it doesnt. |
3f3656c
to
104f314
Compare
Vercel deployment is broken on |
188ab92
to
d0d7bf2
Compare
fix: update tests refactor: replace @testing-library/react-hooks chore: fix bad rebase chore: update snapshots fix: fe tests chore: cleanups chore: bump react-query to support react 18 <3 chore: re-run yarn chore: add skip-cache to build:ts chore: add correct command Revert "chore: add skip-cache to build:ts" This reverts commit e5a8c60.
What does it do?
react
to 18react-dom
to 18react-is
to 18react-test-renderer
to 18react-query
to 3.39.2 (so it officially supports react18)@testing-library/react-hooks
@testing-library/react
to 13.4renderHook
Why is it needed?
Related issue(s)/PR(s)
https://feedback.strapi.io/feature-requests/p/add-support-to-react-18