reactnative-netinfo-mixin

1.0.6 • Public • Published

This Mixin define a state NetInfo for your component

Install

$ npm i --save reactnative-netinfo-mixin

Usage

import React from 'react';
import { View, Text } from 'react-native';
import NetInfoMixin from 'reactnative-netinfo-mixin';
 
const MyComponent = React.createClass({
    mixins: [ NetInfoMixin ],
 
    render() {
        return (
            <View>
                <Text>{ this.state.NetInfo.isConnected ? 'online' : 'offline' }</Text>
            </View>
        );
    }
 
});

Readme

Keywords

Package Sidebar

Install

npm i reactnative-netinfo-mixin

Weekly Downloads

4

Version

1.0.6

License

ISC

Last publish

Collaborators

  • aviramah
  • clementkerneur