Using dehydrate and hydrate function we can persist react query cache in localStorage or AsyncStorage in case of react-native.
Basic implementation for persistence can be made by attaching subscribe function to queryCache and upon new data store the data to persistence layer and upon the app start the persisted cache can be rehydrated.