Expose flag to disable "duplicate atom key" checking / logging, as it was too noisy in environments such as NextJS or some dev environments using Fast Refresh. (#733, #2020, #2046)
RecoilEnv from the recoil package, and set
RecoilEnv.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED = false in code to disable the checking and logging.
- We also support
process.env.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=false in NodeJS environments such as NextJs
- Caution: This disables all checks for duplicate atom keys including legitimate errors, so use with caution!
Workaround for React 18 environments with nested renderers that don't support
useSyncExternalStore(). (#2001, #2010)