react-native-saga-offline
Adds saga actions to offline queue if network is not reachable, dispatch offline actions once network becomes reachable
Installation
npm install --save react-native-saga-offline # with npm
yarn add react-native-saga-offline # with yarn
Link react-native-internet-reachability
react-native link react-native-internet-reachability
How it works
How to use
; const sagaOffline = ;thisstore = this; thisstore;
Add reducer
; const appReducer = ;
Action with meta.retry : true would be queued as offline action
const sagaAction = type: sagaActionsTypesactionType meta: retry: true ;
Action from offline queue with have meta.actionFromOfflineQueue as true