offline-redux.mo
Last updated
Last updated
If you want to make your application work offline, you'll need to check that
Your application has to be used in a low connectivity context (abroad, far from towns, in the subway, in Darius's house, ...)
Control points
To build something optimistic, do the state change on the ACTION, leave the COMMIT empty and rewind the application state on the ROLLBACK.
To build something defensive, change to a pending state on the ACTION and do the definitive state modification on the COMMIT only, the ROLLBACK is still a rewind of the application state.
We also implemented writing feature without redux offline on a project @BAM, let me know if you want to know more !
There are ways to check user's connectivity by pinging one of your own server routes instead of basing it on the phone self awareness of its connectivity.
We did not implement offline calls that would need conflict management (several users able to access the same data at the same time) yet.
Use .
You can use , basically it provides you with all the ACTION, COMMIT, ROLLBACK logic that let you implement optimistic or defensive offline design.
If you are also implementing sagas, take a look at
In order to be able to detect this, you can use the react-native's function to get the connectivity status your phone thinks it has.