Reputation: 816
Need suggestion on which library to use for a large react native mobile app using redux ? redux-offline or react-native-offline ?
I need to regularly check connection status, render view depending on the connection status, add actions to queue when offline and run them when online, cancel actions if some contradiction is there, and persist/rehydrate data offline.
Upvotes: 10
Views: 4228
Reputation: 31
I would suggest going for react-native-offline.
React-native-Offline provides :
Redux-Offline provides:
Both provides the redux-presist with connectors of your preference.
Upvotes: 2
Reputation: 1185
I have evaluated both, and for my use case I decided to go with react-native-offline
. I liked its integration and ease of setup with redux-sagas, and it's offlineQueue
was very convenient to have when you expect your users to conduct many operations offline.
Upvotes: 1
Reputation: 5023
I am using redux-offline
in my react-native
project, it works just great. The feature that you are looking for all are presents like
action
to offline
anytime (online \ offline)discard
method to drop any action based on your business requirement.redux-persist
which automatically persist\rehydrate
data. Also, you can provide your own store mechanism.redux-offline
is working just great for me, Sorry, I haven't used react-native-offline
yet so can't provide you any benchmark.
Upvotes: 4