How to check internet connection in React Native application for both iOS and Android?

后端 未结 7 2220
孤城傲影
孤城傲影 2021-02-07 12:52

I have a React Native application and I\'m seeking to add functionality that checks if there is an active internet connection when the app first starts up, and continuously ther

7条回答
  •  情话喂你
    2021-02-07 13:29

    NetInfo has been removed from React-Native. It can now be installed and imported from 'react-native-netinfo' instead from 'react-native'. See https://github.com/react-native-community/react-native-netinfo

提交回复
热议问题