@wora/detect-network
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

@wora/detect-network

React

Install @wora/detect-network using yarn or npm:

yarn add @wora/detect-network
import { useIsConnected } from "@wora/detect-network";
import { useNetInfo } from "@wora/detect-network";

React Native (react-native-community/react-native-netinfo)

Install @wora/detect-network using yarn or npm:

yarn add @wora/detect-network react-native @react-native-community/netinfo

You then need to link the native parts of the library for the platforms you are using. The easiest way to link the library is using the CLI tool by running this command from the root of your project:

react-native link @react-native-community/netinfo

import { useIsConnected } from "@wora/detect-network";
import { useNetInfo } from "@wora/detect-network";

Example

const isConnected: boolean = useIsConnected();
const netInfo = useNetInfo();

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.1167latest

Version History

VersionDownloads (Last 7 Days)Published
2.0.1167
2.0.062
1.3.10
1.3.00
1.2.10
1.2.00
1.1.00
1.0.00
0.1.10
0.1.00

Package Sidebar

Install

npm i @wora/detect-network

Weekly Downloads

229

Version

2.0.1

License

MIT

Unpacked Size

11 kB

Total Files

31

Last publish

Collaborators

  • morrys