解决:react native使用TabNavigator报错 PropTypes has been moved to a separate package...
来源:互联网 发布:宁波淘宝文案策划招聘 编辑:程序博客网 时间:2024/05/22 10:32
描述:
意思是PropTypes 在react 16以后就从react包中移出去了,在一个单独的包里面,需要安装这个包并从这个包里面引用
原因:
还是构建的react native使用的是比较新的版本,使用的react是16或者以后的版本,而引入的 react-native-tab-navigator 包是比较低的版本还是构建的react native使用的是比较新的版本,使用的react是16或者以后的版本,而引入的 react-native-tab-navigator 包是比较低的版本
解决:
方法1、更新使用最新版的react-native-tab-navigator 组件:进入react native项目根目录,运行命令“ npm install react-native-tab-navigator -save ”,不行则使用方法2 .
方法2、修改模块内的引用,可以根据chrom的控制台提示找到对应的文件去修改,把以下注释的部分改注释下方的内容
/*import React, { PropTypes,} from 'react';*/import React from 'react';import PropTypes from 'prop-types';
阅读全文
2 0
- 解决:react native使用TabNavigator报错 PropTypes has been moved to a separate package...
- python使用问题 "The pandas.io.data module is moved to a separate package "
- React Native报错:Application XXX has not been registered.
- React Native 报PropTypes 问题
- 【React Native】React Native之Navigator has been remove from this package...的问题
- react native关于 从react中引入PropTypes报错的问题
- react react 报错:has not been registered
- react-native PropTypes
- Manually calling a React.PropTypes validation React native
- 解决警告:View.propTypes has been deprecated and will be removed in a future version of ReactNative
- Navigator has been remove from this package报错
- React Native报错unddefined is not an object(evaluating ‘_reactnative.propTypes’)解决办法
- React Native TabNavigator导航
- webpack---粗暴解决Module build failed: Error: The node API for 'babel' has been moved to babel-core
- [react-native] 导入原有的iOS项目报 Application XXX has not been registered错误
- Android报错 Attempted to access a cursor after it has been closed.的解决方法
- Android选择图片报错Attempted to access a cursor after it has been closed.
- 解决Android安装报错a folder failed to be moved ... when ready press yes to try again
- Gym 100641A Continued Fractions 模拟|签到
- yii 图像处理
- 学生成绩管理系统(2)
- Android单击图标的过程
- crackme之019
- 解决:react native使用TabNavigator报错 PropTypes has been moved to a separate package...
- 自动化测试如何解决验证码的问题
- hdu-2669(扩展欧几里得)
- Android 开发规范-极客头条
- Linux内存分配原理
- How browsers work----The rendering engine(1)
- 彻底解决 libhdf5_hl.so.10: cannot open shared object file: No such file or directory
- (18)事务特性、语法、简单原理
- Linux下rz/sz的安装及ssh服务的开启