react-native-reachability-popup
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

react-native-reachability-popup

Reachability Popup it is a React Native module to help you with easily handle and check internet availablility
Global Demo of Spinner Component

## Getting started

$ 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

name description type return
isNetworkReachable check is network reachable Function Boolean
isConnected check is connected to wifi/Lte... Function Boolean

Package Sidebar

Install

npm i react-native-reachability-popup

Weekly Downloads

11

Version

1.0.4

License

MIT

Unpacked Size

192 kB

Total Files

9

Last publish

Collaborators

  • alishahsolanki