-
Notifications
You must be signed in to change notification settings - Fork 66
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
Minified React error #321 in v4.0.0 #172
Comments
Uh-oh. I had a look at the code, I don't see any suspicious hook call. It's supposed to be an invalid Any other details? Like when does the error trigger in your app? |
@pierpo You can find a minimal example that utilizes the first example of this repository at: https://codesandbox.io/s/funny-grass-h84j3i The issue might be related to using React 18, but in principle React 18 should be backward compatible. |
Here's a sandbox that reproduces the error... https://codesandbox.io/s/gifted-sunset-r5zwrq?file=/src/index.js react 18.0.0 import { createRoot } from "react-dom/client";
import { ArcherContainer } from "react-archer";
const rootElement = document.getElementById("root");
const root = createRoot(rootElement);
root.render(
<div>
<ArcherContainer />
</div>
); |
@ThiloAschebrock you beat me to it with seconds to spare 🙈 |
Oh no, how unlucky :) But your example is even more minimal, which is nice 👍🏻 |
Amazing, many thanks to both of you! I need to investigate this asap! |
I think I got it. Looks like the devDependency version of Line 80 in 2258a2b
So, two instances of React live side by side and it makes the hooks go crazy (as said in the docs). I found a solution by adding React externals in the Webpack configuration, but somehow it still includes React if it is found in the + externals: {
+ react: 'react',
+ reactDOM: 'react-dom',
+ }, More generally, I should probably question the presence of the |
Looks like adding + "compilerOptions": {
+ "skipLibCheck": true
+ }, |
I just released 4.0.1. The issue should be solved 😊 I'd love to hear from you if it's the case. Sorry about the delay with this, I was on holiday last week! |
I can confirm that 4.0.1 fixes it in my use case 👍 . Thank you & hope you had a good holiday |
Oh god thanks for the update |
I can also confirm that it is working 👍🏻 |
Thank you all! Sorry again about the delay, this was a critical one hahaha (and I did have a great holiday, thank you 🤗 ) |
There seems to be an issue with version 4.0.0 that can crash the parent React app:
Error trace:
Issue, cf. https://reactjs.org/docs/error-decoder.html?invariant=321
This is probably related to #167. I can't pinpoint the error nor give a short example how to reproduce it.
The text was updated successfully, but these errors were encountered: