How To Build WordPress App with React Native Part #19: Offline Notifications
Too Long; Didn't Read
The offline mode is very handy when we are out of connection and we can still access some of the features in the app. Here, we are just going to notify the network status and cache the data using react-native-NetInfo package. Caching will help to pull the data from the AsyncStorage during the offline mode. For that, we need to use the netinfo package to display the icon in every screen header if we are offline. We used the NetInfo package to show the offline icon in the header.