Skip to content

Szqii/react-native-check-connection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Native Check Connection

This package provides check connection functions.

Package solves the problem of running functions that require internet connection before the device is connected to the internet.

Installation

  • Using NPM

    npm install react-native-check-connection

Usage

  1. Import the function into your project
    import { waitForInternetConnection } from 'react-native-check-connection'
  2. Use function in app.tsx
    await waitInternetConnection()
     // Do stuff that requires internet connection

API

Option Type
waitForInternetConnection () => Promise

Contributing

All contributions are welcome. If you would like to contribute to this project, feel free to submit pull requests. Prior to making significant changes, I recommend opening an issue to discuss the changes.

License

This project is licensed under the MIT license. For more information, refer to the LICENSE file.