I am developing mobile app with react-native, redux toolkit, redux-persist and I need an advice for folowing scenerio.
The app basically stores todo tasks between group of people, and they can create them, delete them ...
Now I am facing this problem:
If the user is offline, he can`t do anything with the data stored on server in database. And I would like to store that action and just keep it for the moment that he will be online again and then dispatch it - send the request to server.
I am developing mobile app with react-native, redux toolkit, redux-persist and I need an advice for folowing scenerio. The app basically stores todo tasks between group of people, and they can create them, delete them ...
Now I am facing this problem: If the user is offline, he can`t do anything with the data stored on server in database. And I would like to store that action and just keep it for the moment that he will be online again and then dispatch it - send the request to server.
Here is the example of actions in createApi :
And in extraReducers in createSlice I have :
-I add the task to frontend while pending so it`s faster I would be glad for any answer or hint, thanks very much for help 🧑💻.