Explore the World's Best Ideas
Join today and uncover 100+ curated journeys from 50+ topics. Unlock access to our mobile app with extensive features.
4
155 reads
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
5
29 reads
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.
4
19 reads
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
4
19 reads
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.
4
24 reads
IDEAS CURATED BY
Learn more about computerscience with this collection
Understanding machine learning models
Improving data analysis and decision-making
How Google uses logic in machine learning
Related collections
Similar ideas
Read & Learn
20x Faster
without
deepstash
with
deepstash
with
deepstash
Personalized microlearning
—
100+ Learning Journeys
—
Access to 200,000+ ideas
—
Access to the mobile app
—
Unlimited idea saving
—
—
Unlimited history
—
—
Unlimited listening to ideas
—
—
Downloading & offline access
—
—
Supercharge your mind with one idea per day
Enter your email and spend 1 minute every day to learn something new.
I agree to receive email updates