This repository has been archived by the owner on Jan 1, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Pull Request resolved: #1473 A better fix for React StrictMode. Instead of maintaining a ref in `<RecoilRoot>` for the set of atoms to re-initialize we will just keep the atoms in `knownAtoms` even when they are cleaned up. This way we maintain the set of known atoms we need to re-initialize. However, we have to be careful to ensure the we actually re-initialize the atom when the effect runs again, even if it is already in `knownAtoms`. We also have to be careful when using an initialized atom in a `Snapshot` that it does not try to re-initialize. Reviewed By: davidmccabe Differential Revision: D32751941 fbshipit-source-id: 7b36a6c6ed344cc899b48d649ea9dafff5af004c
- Loading branch information
1 parent
9019e49
commit 0785ea4
Showing
5 changed files
with
90 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters