import NetInfo , { NetInfoState } from '@react-native-community/netinfo' ; export { NetInfoState } ; export class NetInfoAdapter { private netInfo : typeof NetInfo ; public constructor ( netInfo ) { this . netInfo = netInfo ; } public fetch ( ) { return this . netInfo . fetch ( ) ; } public addEventListener ( listener ) { return this . netInfo . addEventListener ( listener ) ; } }