react-native-check-connection
v1.0.1
Published
Package for checking internet connection in React Native
Downloads
2
Maintainers
Readme
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
- Import the function into your project
import { waitForInternetConnection } from 'react-native-check-connection'
- 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.