O'Reilly logo

React Native Cookbook by Crysfel Villa, Stan Bershadskiy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Synchronizing locally persisted data with a Remote API

When working with a mobile app, network connectivity is something that is often taken for granted. Sure, year after year great strides in availability and bandwidth are made, but everyone still hits a point where they only have one bar and the picture they just sent over iMessage is timing out. What if your application needs to make an API call for something in your application, but you just lost connectivity? Fortunately for us, React Native has a module that reacts to the network connectivity status. We can architect our application in a way that supports the loss of connectivity, and then synchronizes our data by completing an API call when the network connection restores.

This recipe will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required