Ben Borgers

How to get the device's IP address with Expo

April 26, 2020

First, install the expo-network package:

expo install expo-network

Then, import the package in the file you'd like to use it:

import * as Network from "expo-network"

Now, you can use the Network object to get the IP address:

const ip = await Network.getIpAddressAsync()

More blog posts

Subscribe to my newsletter for a monthly round-up of new blog posts and projects Iā€™m working on!

Twitter ↗ RSS feed ↗