-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Fix compilation error on React < 18 #428
Conversation
Run & review this pull request in StackBlitz Codeflow. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## v3 #428 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 1 1
=========================================
Hits 1 1 ☔ View full report in Codecov by Sentry. |
Wow. What an interesting case. Didn't know minifiers can do that. |
I don't know if you really need the bulletproof fix: do people embed wouter inside another package and still expect it to work with react < 18? It's a strange combo |
I see, could you also add a comment above that line to explain the hack? |
Also, one thing I can't wrap my head around is the import of |
The error is "Attempted import error: 'useInsertionEffect' is not exported from 'react' (imported as 'React')."
Released in 3.1.2 |
thanks! |
The error was
Attempted import error: 'useInsertionEffect' is not exported from 'react' (imported as 'React').
I have used the same technique as Emotion emotion-js/emotion@75a2f74#diff-e87fa5e3ae2595fc1671477ceb9c7327f968d5556791d29958210ed43474fc92R17