-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
chore(deps): use React v17 consistently #2397
chore(deps): use React v17 consistently #2397
Conversation
|
Codecov Report
@@ Coverage Diff @@
## main #2397 +/- ##
==========================================
- Coverage 65.70% 64.77% -0.93%
==========================================
Files 85 81 -4
Lines 5106 5332 +226
Branches 1631 1724 +93
==========================================
+ Hits 3355 3454 +99
- Misses 1747 1874 +127
Partials 4 4
Continue to review full report at Codecov.
|
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.
LGTM!
@@ -20,7 +20,11 @@ export async function importCodeMirror( | |||
addons: Promise<any>[], | |||
options?: { useCommonAddons?: boolean }, | |||
) { | |||
const { default: CodeMirror } = await import('codemirror'); | |||
const CodeMirror = await import('codemirror').then(c => | |||
// Depending on bundler and settings the dynamic import either returns a |
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.
great find!
The funky dynamic import logic is all for SSR, but the component is still not compatible with next.js transparently. It worked with earlier versions of next.js but now it doesn’t and you still have to use a funky workaround |
This updates all packages and examples to use React v17. This should help us to avoid any errors related to different versions of React being loaded at the same time.
We also:
parcel@2
in the parcel examplecodemirror
for the parcel example@storybook
dependencies to avoid loading React v16 as sub-dependency