Warning: RCNNetInfo - You are using the deprecated API
See original GitHub issuepusher-js lib appears to be calling a deprecated method from react-native-netinfo.
Warning: RCNNetInfo - You are using the deprecated API...
At a base level test case literally just having the latest installed: “@react-native-community/netinfo”: “^4.2.0” and having a file with nothing in it other than import Pusher from ‘pusher-js/react-native’: “5.0.1”
i will get the warning, when deploying to ios/android simulator
i dug a little into the “@react-native-community/netinfo” specifically https://github.com/react-native-community/react-native-netinfo/blob/master/src/index.ts line 144:
/**
* Deprecated method to get the current state. You should upgrade to the new `fetch` method and
* handle the new state type.
*
* @deprecated
*/
export function getConnectionInfo(): Promise<DeprecatedTypes.NetInfoData> {
DeprecatedUtils.warnOnce();
return DeprecatedState.latest();
}
Will the next update call the new fetch method, or am i missing something? Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (9 by maintainers)
Top Results From Across the Web
Warning after installing react-navigation in a react native project
If react-native-gesture-handler is using or overriding deprecated APIs you could flag an issue on their repo, or fix it yourself by making a ......
Read more >React Native: Deprecated API Usage Apple warning
Fixing ITMS-90809: Deprecated API Usage Apple warning for React Native apps, by finding out which library still uses UIWebView.
Read more >'basevariant' is deprecated. deprecated in java - You.com
'BaseVariant' has been deprecated. I am using BaseVariant like this. import com.android.build.gradle.api.BaseVariant var bundleForVariant: (BaseVariant) ...
Read more >NPM deprecated warning : r/npm - Reddit
new code should use the URLSearchParams API instead. npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar ...
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
I just merged and released version 5.0.2 on npm/everywhere else. There should no longer be deprecation warnings about the netinfo API.
@subotkevic @Deg5112, could you confirm whether this solves your problem? If so I’ll close this ticket.
I would say Friday at the latest.
Thanks again for your contribution @subotkevic!