It does not matter which function of the react-native-network-info I use, I always get a warning ([Unhandled promise rejection: TypeError: null is not an object (evaluating 'RNNetworkInfo.getGatewayIPAddress')]) and the function does not return anything. See code sample. I also already tried to do it exactly as in the documentation (https://www.npmjs.com/package/react-native-network-info):
// Get Default Gateway IP
NetworkInfo.getGatewayIPAddress().then(defaultGateway => {
console.log(defaultGateway);
});
import { NetworkInfo } from "react-native-network-info";
_updateStates = () => {
...
...
NetworkInfo.getGatewayIPAddress((gateway) => {
console.log(gateway);
});
};