版权声明:原创文章,转载请说明出处 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应该先安装:
npm install react-native-deprecated-custom-components --save
然后在要用的地方导入,即可使用Navigator。
import {Navigator} from 'react-native-deprecated-custom-components';