-
Notifications
You must be signed in to change notification settings - Fork 1.2k
environmental variable to suppress duplicate atom key warning #2020
environmental variable to suppress duplicate atom key warning #2020
Conversation
Hi @brahn! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
@wd-fb has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@brahn has updated the pull request. You must reimport the pull request before landing. |
@wd-fb has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Thanks so much for this! There were a few Meta internal tests failing (to do with console logging expectations), I may have to make some tweaks on the tests but hopefully we can get this merged/released soon |
Thanks @wd-fb ! I appreciate the update, and please lmk if there's anything I can do to help with the internal tests. |
Omg thank you so much. Now I can finally use recoil in my next.js apps. BIG LOVE! <3 |
Hi @wd-fb just checking back in, let me know if there's anything I can do to help! |
Thanks for the patience, we will be doing a patch release soon. It will also include a runtime settable flag for other environments which don't use 'process' (Vite for example) |
@wd-fb fantastic, thanks for the update! |
Updated API with #2046 |
This PR is an attempt to address #733 by introducing an environmental variable
process.env.SUPPRESS_DUPLICATE_ATOM_KEY_WARNING
that suppresses the duplicate atom key warning.The first commit just adds tests for the current behavior, i.e. logging to
console.error
/console.warn
, depending on the value ofwindow.__DEV__
. The second commit adds the new behavior and tests for the additional cases where this environmental variable is set.Feedback and suggestions would be most welcome!