-
Notifications
You must be signed in to change notification settings - Fork 64
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 React #753
Upgrade React #753
Conversation
✔️ Deploy Preview for storeui ready! 🔨 Explore the source changes: 1e57d01 🔍 Inspect the deploy log: https://app.netlify.com/sites/storeui/deploys/60c4b431a63c510007798655 😎 Browse the preview: https://deploy-preview-753--storeui.netlify.app |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 1e57d01:
|
c6b02fc
to
1c68935
Compare
You should use the npm version on store repositories. |
Not sure about removing StrictMode. If anything, there are additional benefits on using StrictMode on React 18, rather than not needing it anymore: Troubleshooting on reactwg/react-18#6 plus reactwg/react-18#19 It's supposed to help catching concurrent-mode borne issues, among other things |
I'm removing from root because Gatsby is not compatible with strict mode. This makes us have two versions of the same page being rendered on the screen for instance. However, I agree with you. Maybe we should add strict mode to wrap the page element. This way we skip Gatsby but keep our code compatible with strict mode. I'll see if I find any error while doing this |
6c99b68
to
c7b8451
Compare
c7b8451
to
e9a5dec
Compare
* upgrade react deps * use strict mode in dev only
What's the purpose of this pull request?
Add support for react 18.
How it works?
React 18 is currently shipping its first alpha version. After the release of this alpha version, the experimental branch of React, that is currently being used in our stores, promoted the
unsable_createRoot
API tocreateRoot
. In order to not be in sync with the nightly builds of react, and since we were using a very old release of react, this PR supports React 18.With this, I also enabled the
FAST_DEV
,DEV_SSR
andPARALLEL_SOURCING
flags in all repos.How to test it?
Test the deploy previews on these links:
https://github.com/vtex-sites/btglobal.store/pull/609
https://github.com/vtex-sites/storecomponents.store/pull/975
https://github.com/vtex-sites/marinbrasil.store/pull/519
https://github.com/vtex-sites/carrefourbrfood.store/pull/769