At some point we will need to locally store the global state of our application, this will allow us to restore the state the next time the user opens the app. For example, we might want to keep the current view the user is using on the state. This way we can show the same view when the app gets loaded again.
We might also want to cache some information to avoid calling the API multiple times; this will improve the performance, as well as the traffic on your server.
On Chapter 4, Working with Application Logic and Data, we learned about different methods to store data on the device, so for this recipe, we will use
This recipe depends on the previous ones, so make sure to follow along with ...