您的位置:首页 > Web前端 > React

解决React Native报错:Navigator is deprecated and has been removed from this package.

2018-11-12 19:27 585 查看
版权声明:原创文章,转载请说明出处 https://blog.csdn.net/Destiny_strive/article/details/83996082

报错如下:

        Navigator is deprecated and has been removed from this package. It can now be installed and imported from `react-native-deprecated-custom-components` instead of `react-native`. Learn about alternative navigation solutions at http://facebook.github.io/react-native/docs/navigation.html'

看报错信息应该是RN版本升级把Navigator移除了,我现在版本是0.57.0。

要使用Navigator应该先安装:

[code]npm install react-native-deprecated-custom-components --save

然后在要用的地方导入,即可使用Navigator。

[code]import {Navigator} from 'react-native-deprecated-custom-components';

 

阅读更多
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐