Comment by aidos
2 years ago
Gotcha, thanks for the clarification. I’m not sure what that would buy me here.
I have a rule that I only async if it’s a requirement. In my case I can carry out all the steps in a single (simple) sync action. Our updates are optimistic so we update all the models immediately and mobx reflects that in the react components on the next frame.
The network request for the mutation is the only thing that’s running async. If that fails we crash the app immediately rather than trying to rollback bits in the frontend. I know that approach isn’t for everyone but it works well for us.
No comments yet
Contribute on Hacker News ↗