Deconstructing Apollo Part 2: Optimistic Updates · Blog
An email just came into your inbox, you go to check what it is and see that it’s just some LinkedIn recruiter trying to get you interested in their series B company with X million in funding and a unique, disruptive take on an industry set to explode in the next couple years. Because you’re a rockstar developer and get emails like this all the time, you swipe the email away and it moves to your archives. While the email disappeared immediately, it might be the case that it has not actually been marked as archived on any server, and is instead optimistically updating locally in your email application. This type of functionality is commonplace in apps to provide a fluid experience that isn’t interrupted by lots of loading states. The Apollo Client comes with support for optimistic updates which you can check out on their docs. The official documentation does a great job of illustrating how to use this feature in your own applications, so I won’t go into much detail on how to use it here.
An email just came into your inbox, you go to check what it is and see that it’s just some LinkedIn recruiter trying to get you interested in their series B company with X million in funding and a unique, disruptive take on an industry set to explode in the next couple years. Because you’re a rockstar developer and get emails like this all the time, you swipe the email away and it moves to your archives. While the email disappeared immediately, it might be the case that it has not actually been marked as archived on any server, and is instead optimistically updating locally in your email appli
Explore this link on the map →