I am looking at building an offline first React Native Expo app that automatically pushes data to an API when the device gets a connection. However I am struggling to see how if this is possible within Expo and need some guidance.
The app will need to store data from an API for offline use (presumably on first load, which will then be used to populate fields in a form). The form needs to work offline, with the input data stored on the device until it receives a new connection. At that point the app should push the data to an API (whilst the app is in the background). So I need to do multiple things:
- Automatically download and store data from an API on first launch.
- Store input data - from form fields whilst offline.
- Background sync - Upload this user form data when a new connection is received, regardless of whether the app is running in the background or not.
- Work on Android and iOS devices.
I have been looking at redux-offline, but unsure if it still supported and/or will satisfy all four requirements? There is also redux-persist but I can't see how this satisfies the background sync?
Thanks for any help/guidance!