2.0.1 • Published 3 years ago

@wora/detect-network v2.0.1

Weekly downloads
597
License
MIT
Repository
github
Last release
3 years ago

@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();
2.0.1

3 years ago

2.0.0

4 years ago

1.3.1

4 years ago

1.3.0

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago