Keep reading for FREE
When back online, you should sync the server with the offline actions. To do so, you should maintain a queue with all the API requests, for executing when the connection will be restored. This queue should be persisted in redux, to remain after several offline sessions
To implement the concepts presented above, you need some help from libraries like Redux-Persist and Netinfo. Redux-Persist will help when launching the app, to populate the Redux with data from the previous session, checking the black and white lists. Netinfo can be used to check the status of the network connection.
When trying to make a POST, the local state should be updated and Redux should check the internet connection, to see if should make the api request or add it to the queue.
Notice: The modified data should be persisted, so there won't be any discrepancies between sessions
If there is no internet connection, the data should be extracted from the local storage. Otherwise, a fetch request will be made, including a timestamp, with the last sync with the server. The server will than reply with the updated data and the timestamp will be updated, representing a checkpoint.
MORE LIKE THIS
Ready for the next level?
Read Like a Pro
Explore the World’s
Take Your Ideas
Just press play and we take care of the words.
No Internet access? No problem. Within the mobile app, all your ideas are available, even when offline.
2 Million Stashers
Don’t look further if you love learning new things. A refreshing concept that provides quick ideas for busy thought leaders.
Great interesting short snippets of informative articles. Highly recommended to anyone who loves information and lacks patience.
Best app ever! You heard it right. This app has helped me get back on my quest to get things done while equipping myself with knowledge everyday.
This app is LOADED with RELEVANT, HELPFUL, AND EDUCATIONAL material. It is creatively intellectual, yet minimal enough to not overstimulate and create a learning block. I am exceptionally impressed with this app!
I have only been using it for a few days now, but I have found answers to questions I had never consciously formulated, or to problems I face everyday at work or at home. I wish I had found this earlier, highly recommended!
Great for quick bits of information and interesting ideas around whatever topics you are interested in. Visually, it looks great as well.
Even five minutes a day will improve your thinking. I've come across new ideas and learnt to improve existing ways to become more motivated, confident and happier.
Brilliant. It feels fresh and encouraging. So many interesting pieces of information that are just enough to absorb and apply. So happy I found this.
Read & Learn
Access to 200,000+ ideas
Access to the mobile app
Unlimited idea saving & library
Unlimited listening to ideas
Downloading & offline access
Claim Your Limited Offer
Get Deepstash Pro
75% OFF | 1-Year Pro Subscription