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)
- Import
RecoilEnv
from the recoil package, and setRecoilEnv.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!
- Import
Workaround for React 18 environments with nested renderers that don't support
useSyncExternalStore()
. (#2001, #2010)
Recoil 0.7.6
· One min read