Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.3k
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
I find myself repeating Would it be crazy to allow a "default" createMachine({initial:'running',states:{running:{onError:'failed',// 👈 This is what I would like to dostates:{idle:{invoke:{src:'someService',onDone:'processing'}},processing:{invoke:{src:'someOtherService',onDone:'success'}},success:{}}},failed:{// From here we could resume to a history state}}}) Invoked actors within the |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 1 comment 1 reply
-
This is a good idea. Might not really be type-safe, since it's hard to predict which invokes it's for, and ideally this can be used for any error that happens in the state. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
I like this idea, and I would also like for |
BetaWas this translation helpful?Give feedback.