NetInfo has been extracted from core in react-native 0.59
See original GitHub issueDo you want to request a feature or report a bug? Bug
What is the current behavior? When using pusher in React Native 0.59 throws this warning:
Warning: NetInfo has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-community/netinfo' instead of 'react-native'. See https://github.com/react-native-community/react-native-netinfo
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar. Install pusher in a fresh react native project.
What is the expected behavior? No warning.
Which versions of Pusher, and which browsers / OS are affected by this issue? Latest
Issue Analytics
- State:
- Created 5 years ago
- Reactions:15
- Comments:25 (14 by maintainers)
Top Results From Across the Web
NetInfo has been extracted from react-native ... - Stack Overflow
salam after update react native appears this error
Read more >NetInfo has been extracted from react-native core and will be ...
Coding example for the question NetInfo has been extracted from react-native core and will be removed-React Native.
Read more >@react-native-community/netinfo - npm
React Native Network Info API for iOS & Android. ... Actions Supports Android, iOS, macOS, Windows and Web MIT License Lean Core Extracted....
Read more >Upgrade to React Native 0.60 - Matt Oakes
Linking native libraries has always been one of the harder parts of React ... In 0.59 some additional components and APIs were extracted...
Read more >14 posts tagged with "release" - React Native
WebView and NetInfo were previously extracted into separate repositories, ... The react-native-git-upgrade command has been removed in 0.59, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s great @oblador. I’m going to be working on pusher-js for the next few days, so I should be able to get this released
Install package
@react-native-community/netinfo
to suppress the warning.yarn add @react-native-community/netinfo
react-native link @react-native-community/netinfo
react-native run-android
orreact-native run-ios
Change
import { NetInfo } from "react-native";
to:
import NetInfo from "@react-native-community/netinfo";