4 ms·
Generally speaking, optimistic updating should have some type of UI to subtly display the network status so the user is aware of what is going on under the hood
by pault 8y ago
Generally speaking, optimistic updating should have some type of UI to subtly display the network status so the user is aware of what is going on under the hood, but the network activity doesn't block them from performing additional actions. This model brings a whole boatload of complexity to your implementation however, so be prudent with where and how often you apply it.
- bpicolo 8y agoIt's often not worth the overhead to develop for small bits like `likes`. For small, 30-50ms requests they're not going to notice anything either way. A brief flash of an icon isn't useful.
- dcd0101 8y agoIf we’re only talking about operations that are fast, nearly bulletproof, and trivial, then I’m even less sold on the idea. In the article it describes reverting the state of the component if the action fails, asynchronously. IMO that’s much worse than briefly representing a progress state for a few ms.
- fenwick67 8y ago> It's often not worth the overhead to develop for small bits like `likes` Two things. 1. Likes are not a small detail of a social network app 2. If you're handling a failure state when the HTTP request comes back (like the author does), handling the success state is just an `else`