I'm making a tracking app, where users need to be able to update logs when they are offline, potentiall for weeks at a time. Then on reconnect, I need the app to send them all to my firebase back end.
Even when offline, I want the user to see the entries they've made, and be able to interact with it.
I'm using Redux Thunk actions to run the firebase call, as well as update SQLite locally before finally updating the state.
It looks like react-native-offline is the thing to use, but after reading the documentation, I'm still baffled as to how it works. It says it will "Re-dispatch the action/thunk as soon as the internet connection is back online again" but what if I don't want it to update the SQLite database or State when it reconnects? It seems like it would be making a double entry into SQLite. The first when the action is run (offline) and the second when it reconnects to the internet.
Am I missing somethign about how react-native-offline works / is there a better way to implement this?
This is an expo managed project.