Version: offix-0.15.0
React Native
To integrate offix in React Native, developers need to provide custom storage and network layers, a working example can be found in the offix React Native example app.
We recomend developers use following React Native plugins:
@react-native-community/async-storage
- for storage@react-native-community/netinfo
- for network information
Note: if you are using Expo, you must use the AsyncStorage included in react-native
instead.
#
IntegrationTo integrate with offix we need to create wrappers for storage and network.
Note: if using expo, you will need to import { AsyncStorage } from 'react-native';
instead of using the @react-native-community/async-storage
package.
For the network listener, create a new class ReactNativeNetworkStatus.js
.
For a fully functional example please check react native example app: https://github.com/aerogear/offix-react-native-example