Internet Connection Alert For React Native

React Native Internet Connection Alert

React Native Internet Connection Alert React Native Internet Connection Alert


Add the dependency:

npm i react-native-internet-connection-alert

Peer Dependencies

IMPORTANT! You need install them
"react-native-dropdownalert": "=> 4.3.0",
"@react-native-community/netinfo": "=> 5.9.6"



import InternetConnectionAlert from "react-native-internet-connection-alert";

Fundamental Usage

I strongly suggest that cover whole application with InternetConnectionAlert component it will handle itself and be able to shows the built-in alert on your whole application. Otherwise, just cover the screen where you need to use this library.

  onChange={(connectionState) => {
    console.log("Connection State: ", connectionState);
  {/* {... Your whole application should be here ... } */}

Configuration - Props

Property Type Default Description
onChange function undefined if you need the connection state when it is changed, you can use this function
type DropdownAlertType error Use some of the prepared dropdown types or if you want to use your own customization set ‘custom’
title string Internet Connection Problem to change the title of built-in alert
message string Please check your network connection to change the message of built-in alert

Everything is customizable on built-in dropdownalert. Simply please look at the React Native Dropdown Alert

Future Plans

  • [x] LICENSE
  • [ ] Write an article about the lib on Medium



Download Details:

Author: WrathChaos

Source Code:

#react-native #react #mobile-apps

Internet Connection Alert For React Native
11.50 GEEK