-
Notifications
You must be signed in to change notification settings - Fork 7
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
Migrate to new react (18) #209
Comments
Btw, testing framework enzyme is not supported in react 18. |
SummaryWith React and React DOM upgraded to version 18.2.0 and other packages which were possible to upgrade to correspond to React 18.2.0 as well, only two packages have conflicts:
After migrating storybook to latest version (7.0.23), which brings some significant changes (binaries not used, instead used storybook cli), the stories for Answer do not work, because the intl field is undefined (probably because of not using the library 1. in the list above). IncompatibilitiesWith React and React DOM upgraded to v 18.2.0, these warnings occur:
After upgrading @storybook dependencies to latest versions (7.0.23) and react-datepicker, react-intl, etc. to their latest versions, only these errors remain:
Migration of storybookdocs
These scripts are from new dependency - |
…torybook, react component libs, testing libs,...) synchronised. Work in progress. Library for global storybook controls has React 18 as optional peer dependency, need to examine closer.
Current state:
Next:
Fix NPM netlify strorybook build. |
EnzymeAfter further investigation (1)(2) into Enzyme and React 17 / React 18 enzyme adapter, I think the tests will need migration from using Enzyme into another library (for example react-testing-library). In the current state 11 tests (only from Storybook & global controlsAfter further investigation, it seems the storybook stories would benefit from refactoring them into the newest scenario format. The reason is more efficient decorator application (Applying react context providers to components). As [email protected] is not compatible with Storybook 7, I looked into handling globals and it seems that storybook has its own built-in globals and toolbars mechanism. Netlify build fixWith Storybook upgraded to version 7, it is dependant on version of Node to be higher than 16. Netlify should use Node 18 by default, but if I understand correctly, it had some cached Node 12. To force Netlify to use Node 18, I added .node-version file to this repository and then the build succeded. |
@VojtechLunak great job so far. I agree with storybook ideas and netlify fix. W.r.t. enzyme i cannot judge what is most appropriate library switch so i guess it is fine as well. |
…rybook. Decorators might need further work to make it simple and unified
Storybook scenario sections refactor. |
[#209] React and React DOM upgraded to v18
We need to migrate to the newest react.
Consider and write info here about:
A/C:
The text was updated successfully, but these errors were encountered: