摆脱RN 0.59的ViewPagerAndroid和滑块警告

时间:2019-04-22 00:02:49

标签: react-native

升级到RN 0.59后,在测试期间每次在android模拟器屏幕上都会显示2条警告消息:

Warning: ViewPagerAndroid 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/viewpager' instead of 'react-native'. See https://github.com/react-native-community/react-native-viewpager

Warning: Slider 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/slider' instead of 'react-native'. See https://github.com/react-native-community/react-native-slider

有几篇有关这些警告的在线帖子,但没有解决办法可以消除。当我看到这两个警告时,是否表示我的应用代码正在使用过时的软件包?我正在做一个实时聊天应用程序,想知道如何摆脱android仿真器上的那些警告。

1 个答案:

答案 0 :(得分:1)

这意味着,如果您为项目ViewPager更新RN,则可能会被删除,并且您的代码将无法正常工作,现在它可以正常工作