1.0.1 • Published 8 months ago

react-native-check-connection v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

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

OptionType
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.