I have a React Native application integrated with Relay, and I want the first user experience available for users.
So, in the first launch of the application, a placeholder should be shown when the data is loaded. After that, every time the application starts, I want to show the latest cached data while the latest data is loading.
I found this problem since 2015 and based on the response to eyston I tried to implement CacheManager based on relay-cache-manager using AsyncStorage . With CacheManager, I can save and load relay entries from the cache, but when the network is disconnected, the application cannot display cached data.
Is there any way to use cached relay data when a relay retrieves fresh data?
source share