-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Duplicate atom key warning when used from multiple bundles #213
Comments
@drarmstr thanks for linking this issue to a PR. However I also have a second part - that the error 'Duplicate atom key .' is not correct. Should I file a new issue about that, or do you have any feedback on this? |
Are you using HMR? That will trigger that error I believe. |
I am using hmr however the error shows without hmr being invoked (no files are changed, just loading the app generates the error) |
@atanasster I don't think we've seen the duplicate key issue outside of HMR, but it sounds like it may be due to the atom being created twice from the two bundles? |
@atanasster - Please re-open this issue if you continue to see a problem without HMR. |
any news? |
time to re-open the issue :/ |
Experiencing the same issue as @hmtri1011 described. |
@hmtri1011 Any solution ? |
I felt it's worth mentioning this. If you declare your atom/selector inside the same file it is being used, you will see this warning whether your have hot module replacement enabled or not. It is best to import it. |
Do you mean this for Nextjs? I try to somehow solve this issue in my Nextjs project is there any way of doing this currently? |
I'd love to be able to suppress these warnings in NextJS too. I get the warnings both during dev (prob due to HMR) and also during build time (much more noticeable) I assume thats because it's included in common chunks that next adds to every statically generated route. However, in both instances everything seems to work just fine. P.S - When I used recoil in Gatsby (fully statically generated), I didn't have this problem, so it's prob something to do with the way NextJS handles bundling and SSR Thanks! |
Any update on this issue ? |
Dirty workaround here |
For 0.0.8, I am getting the following blocking error (was working fine with 0.07):
recoil.development.js:117 Uncaught TypeError: Cannot destructure property 'error' of 'undefined' as it is undefined.
Two issues afaics:
Recoil/src/core/Recoil_Node.js
Line 84 in 22b42bb
The text was updated successfully, but these errors were encountered: