Navigator不能用问题

作者: 伦家这么萌 | 来源:发表于2017-07-31 13:24 被阅读96次

根据信息,react-native这个包中的Navigator已经被移除,而需要导入react-native-deprecated-custom-components这个包来使用Navigator。于是就需要安装这个包并引入。具体做法如下:

1. 通过npm安装相应的库

在项目根目录下输入npm i react-native-deprecated-custom-components –save 回车。

2. 在使用的JS文件中将Navigator引入进来,就是import

import {Navigator} from ‘react-native-deprecated-custom-components’;

然后就可以在项目中正确使用Navigator了。

相关文章

网友评论

    本文标题:Navigator不能用问题

    本文链接:https://www.haomeiwen.com/subject/pdaklxtx.html