We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfde1f4 commit 5f47ff8Copy full SHA for 5f47ff8
readme.md
@@ -36,11 +36,15 @@ function Loader() {
36
}
37
// This is the ‘loading’ state
38
function* loading() {
39
+ // This function will be called when this state is entered.
40
+ // Its return value is available at `loader.resolved.fetchData`
41
yield entry(fetchData);
42
+ // If the promise succeeds, we will transition to the `success` state
43
+ // If the promise fails, we will transition to the `failure` state
44
yield on("SUCCESS", success);
45
yield on("FAILURE", failure);
46
- // States can be final
47
+ // States that don’t yield anything are final
48
function* success() {}
49
// Or they can define transitions to other states
50
function* failure() {
0 commit comments