1.0.4 • Published 4 years ago

react-native-reachability-popup v1.0.4

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

react-native-reachability-popup

$ yarn add react-native-reachability-popup

Usage

Basic Usage

The Spinner component it's build to a global use, so you have to instance this component once in your main app screen always as a last inserted component:

import React from "react";
import { View } from "react-native";
import Reachability { isNetworkReachable, isConnected } from "react-native-reachability-popup";

export default class App extends React.Component {
    render() {
        return (
            <View style={{ flex: 1 }}>
                <View ref={"otherView1"} />
                <View ref={"otherView2"} />
                <View ref={"otherView3"} />
                {/* GLOBAL REACHABILITY COMPONENT INSTANCE */}
                <Reachability />
                {/* <--- here as last component */}
            </View>
        );
    }
}

Common properties

namedescriptiontypereturn
isNetworkReachablecheck is network reachableFunctionBoolean
isConnectedcheck is connected to wifi/Lte...FunctionBoolean