If you want to make your application work offline, you'll need to check that
- Data are persisted accross application restart
- Your user is aware of its connectivity state
- When you're offline, you gracefully handle the network interraction for the user
Your application has to be used in a low connectivity context (abroad, far from towns, in the subway, in Darius's house, ...)
- Working with React-Native app
- Using Redux as an application state manager
- Persist some data
- Kill your app
- Turn it to plane mode
- Open your app
- See your data
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.