How to make optimistic update using solidjs?
Currently I do not have any code for optimistic update. I need simple example for this considering below code.
I found this article but can not find document for
createMutation
- https://github.com/solidjs/solid/discussions/770GitHub
RFC - Mutation Primitive · solidjs solid · Discussion #770
Summary In this RFC I'm looking for feedback on the potential of a core Mutation primitive. While nothing being proposed could not be done in user-land, there is a good argument for establishin...
2 Replies
there are more than one way to do optimistic updates but the general steps are:
- create the optimistic state
- show it while loading
- once loaded, if no error use normal state and destroy optimistic state
- if error, show error
thank you for information.