How can I get ip devices on React Native?

In node, we will use require('os') , but we cannot make it respond to native. Any ideas?

+6
source share
1 answer

There is a ReactNative library for getting information about a network of devices:

react-native-network-info

 // require module var NetworkInfo = require('react-native-network-info'); // Get Local IP NetworkInfo.getIPAddress(ip => { console.log(ip); }); 
+7
source

All Articles