---
modificationDate: January 22, 2026
title: '@react-native-community/netinfo'
description: A cross-platform API that provides access to network information.
sourceCodeUrl: 'https://github.com/react-native-community/react-native-netinfo'
packageName: '@react-native-community/netinfo'
platforms: ['android', 'ios', 'tvos', 'web', 'expo-go']
inExpoGo: true
---

<AgentInstructions>

## Submitting Feedback

If this page contains errors, outdated information, or gaps that blocked you from completing a task, report it so the docs can be improved:

curl -X POST https://api.expo.dev/v2/feedback/docs-send -H 'Content-Type: application/json' -d '{"url":"/versions/v55.0.0/sdk/netinfo/","feedback":"🤖 Agent feedback: <specific, actionable description>"}'

Only submit when you have something specific and actionable to report.

</AgentInstructions>

# @react-native-community/netinfo

A cross-platform API that provides access to network information.
Android, iOS, tvOS, Web, Included in Expo Go

> For the complete documentation index, see [llms.txt](/llms.txt). Use this file to discover all available pages.

`@react-native-community/netinfo` allows you to get information about connection type and connection quality.

## Installation

```sh
npx expo install @react-native-community/netinfo
```

If you are installing this in an [existing React Native app](/bare/overview), make sure to [install `expo`](/bare/installing-expo-modules) in your project. Then, follow the [installation instructions](https://github.com/react-native-community/react-native-netinfo#getting-started) provided in the library's README or documentation.

## API

To import this library, use:

```js
import NetInfo from '@react-native-community/netinfo';
```

If you want to grab information about the network connection just once, you can use:

```js
NetInfo.fetch().then(state => {
  console.log('Connection type', state.type);
  console.log('Is connected?', state.isConnected);
});
```

Or, if you'd rather subscribe to updates about the network state (which then allows you to run code/perform actions anytime the network state changes) use:

```js
const unsubscribe = NetInfo.addEventListener(state => {
  console.log('Connection type', state.type);
  console.log('Is connected?', state.isConnected);
});

// To unsubscribe to these update, just use:
unsubscribe();
```

## Accessing the SSID

To access the `ssid` property (available under `state.details.ssid`), there are a few additional configuration steps:

-   Request location permissions with [`Location.requestForegroundPermissionsAsync()`](/versions/v55.0.0/sdk/location#locationrequestforegroundpermissionsasync) or [`Location.requestBackgroundPermissionsAsync()`](/versions/v55.0.0/sdk/location#locationrequestbackgroundpermissionsasync).

### iOS only

-   Add the `com.apple.developer.networking.wifi-info` entitlement to your **app.json** under `ios.entitlements`:
    
    ```json
    "ios": {
        "entitlements": {
          "com.apple.developer.networking.wifi-info": true
        }
      }
    ```
    
-   Check the **Access Wi-Fi Information** box in your app's App Identifier, [which can be found here](https://developer.apple.com/account/resources/identifiers/list).
    
-   Rebuild your app with [`eas build --platform ios`](/build/setup#4-run-a-build) or [`npx expo run:ios`](/more/expo-cli#compiling).
    

## Learn more

[Visit official documentation](https://github.com/react-native-netinfo/react-native-netinfo) — Get full information on API and its usage.
