forked from facebookexperimental/Recoil
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Async Atom effect initialization (facebookexperimental#448)
Summary: Pull Request resolved: facebookexperimental#448 Explore async atoms by adding subset of functionality to initialize an atom via a Promise with an atom effect. This follows the semantics in [RFC Async Atoms](https://fb.quip.com/TUAhAfJI1CfJ). If an atom is initialized to a pending async value, then set to a new value before the promise resolves, the resolved async value is ignored. If the promise is rejected, then the atom will enter an error state and throw as appropriate during render. Reviewed By: csantos42 Differential Revision: D22271167 fbshipit-source-id: 735a6a21882759d68eb70980abb64d10e532921a
- Loading branch information
1 parent
68f5de4
commit f7cc45f
Showing
3 changed files
with
202 additions
and
27 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