Going Offline
Users expect applications to operate seamlessly with unreliable network connections. If your mobile application can’t cope with transient network issues, your users will use a different app. When there’s no network, you have to persist data locally on the device. Alternatively, perhaps your app doesn’t even require network access, in which case you’ll still need to store data locally.
In this chapter, you’ll learn how to do those three things with React Native. First, you’ll learn how to detect the state of the network connection. Second, you’ll learn how to store data locally. Lastly, you’ll learn how to synchronize local data that’s been stored due to network problems once it comes back online.
In this chapter, we’ll cover the following topics:
- Detecting the state of the network
- Storing application data
- Synchronizing application data