# @wora/detect-network

> @wora Detect Network

Latest version **2.0.1** (published 2021-04-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @wora/detect-network
pnpm add @wora/detect-network
yarn add @wora/detect-network
bun add @wora/detect-network
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2021-04-27 |
| First published | 2019-06-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 10.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 176 |
| Author | morrys |
| Maintainers | morrys |
| Keywords | wora, react-native, detect, network, react, hooks |

## Links

- npm: https://www.npmjs.com/package/@wora/detect-network
- Repository: https://github.com/morrys/wora
- Issues: https://github.com/morrys/wora/issues
- Funding: https://github.com/sponsors/morrys
- npm.io page: https://npm.io/package/@wora/detect-network

## Dependencies (1)

- [@wora/netinfo](https://npm.io/package/@wora/netinfo.md) ^2.1.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2021-04-27
- 2.0.0 — 2020-04-18
- 1.3.1 — 2020-04-04
- 1.3.0 — 2019-10-13
- 1.2.1 — 2019-08-22
- 1.2.0 — 2019-08-04
- 1.1.0 — 2019-07-14
- 1.0.0 — 2019-07-06
- 0.1.1 — 2019-06-10
- 0.1.0 — 2019-06-10

## README

# [@wora/detect-network](https://github.com/morrys/wora)

## React

Install @wora/detect-network using yarn or npm:

```
yarn add @wora/detect-network
```

```ts
import { useIsConnected } from "@wora/detect-network";
import { useNetInfo } from "@wora/detect-network";
```


## React Native ([react-native-community/react-native-netinfo](https://github.com/react-native-community/react-native-netinfo/blob/master/README.md))

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`


```ts
import { useIsConnected } from "@wora/detect-network";
import { useNetInfo } from "@wora/detect-network";
```


## Example

```ts
const isConnected: boolean = useIsConnected();
const netInfo = useNetInfo();
```

---
_Source: https://npm.io/package/@wora/detect-network · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
