You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feels heavy. I wonder if we could clean this up by adding a layer of abstraction:
// 1. A general "send" helper, where you don't need to know about the repo at allimport{send}from'microcosm'// 2. Actions themselves can be generators, not just returning a functionfunction*createUserFlow(params){yieldsend(validate,params)letuser=yieldsend(createUser,'/users')yieldsend(navigate,'/users/'+user.id)}
Generator actions are quickly becoming my favorite form of writing actions:
This feels heavy. I wonder if we could clean this up by adding a layer of abstraction:
Under the hood,
send
might do something like:We'd pass
repo
to the action inside of Microcosm.The text was updated successfully, but these errors were encountered: