28

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 ...

Get React and React Native - Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.