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)
RecoilEnvfrom the recoil package, and set
RecoilEnv.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED = falsein code to disable the checking and logging.
- We also support
process.env.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=falsein 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)
· 阅读时间为 1 分钟