question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NetInfo has been extracted from core in react-native 0.59

See original GitHub issue

Do 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:closed
  • Created 5 years ago
  • Reactions:15
  • Comments:25 (14 by maintainers)

github_iconTop GitHub Comments

5reactions
leesiocommented, Jun 13, 2019

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

5reactions
harikrishnanpcommented, Apr 4, 2019

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 or react-native run-ios

Change import { NetInfo } from "react-native";

to:

import NetInfo from "@react-native-community/netinfo";

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found