Add Read-Only Offline Support Using the Offline Exchange from urql GraphCache
lessonDuration 4m 11s
We'll install the Async Storage and the React Native-compatible offline storage for graphcache, and configure the news app to show cached data when offline. You'll be able to set how long data is cached for offline viewing. **Resources:** - GraphCache offline: https://formidable.com/open-source/urql/docs/graphcache/offline/ - React Native offline storage for Graphcache: https://github.com/FormidableLabs/urql/tree/main/packages/storage-rn - Async Storage: https://react-native-async-storage.github.io/async-storage/docs/install/ **Expo:** - Install Async Storage using the expo cli: `expo install @react-native-async-storage/async-storage` **Checkpoint:** [Show past data from cache when offline](https://github.com/kadikraman/news-flash/commit/fd12f6a053b1048658fb86b49a4786bde03f2956)