2 ms·
MST doesn't have the same restrictions as redux in terms of async so you don't need to do it in the same way. Edit: In MST it would look more like plain js:
by aidos 9y ago
MST doesn't have the same restrictions as redux in terms of async so you don't need to do it in the same way.
Edit: In MST it would look more like plain js:
class AuthStore() {
....
{
login() {
do_async_thing()
.then(this.postLoginStuff)
.catch(this.handleFailedLogin)
},
logout() {
// do logout stuff
}
}
}