新升级  到0.46版本以后 Navigator 不能使用报错。

'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'

解决方案:

1、cd 当前目录

2、npm install react-native-deprecated-custom-components --save

3、import {Navigator} from 'react-native-deprecated-custom-components';

4、

          <Navigator
initialRoute={{ name: '首页', component: Home }}
//配置场景
configureScene=
{
(route) => { //这个是页面之间跳转时候的动画,具体有哪些?可以看这个目录下,
//有源代码的: node_modules/react-native/Libraries/CustomComponents/Navigator/NavigatorSceneConfigs.js // return Navigator.SceneConfigs.PushFromRight;
return ({
...Navigator.SceneConfigs.PushFromRight,
gestures: null,
});
}
}
renderScene={
(route, navigator) => {
let Component = route.component;
return <Component {...route.params} navigator={navigator} />
}
} />

最新文章

  1. RSA加密例子和中途遇到的问题
  2. Java 导入Excel文件到数据库
  3. OC之NSString、NSMutableString学习笔记 常用方法
  4. jQuery plugin: Autocomplete 参数及实例
  5. hostapd源代码分析(三):管理帧的收发和处理
  6. HDAO one error
  7. 2014多校第六场 1010 || HDU 4930 Fighting the Landlords (模拟)
  8. Remove Duplicates from Sorted List @LeetCode
  9. 省市区三级联动JS
  10. VCRedist.exe静默安装方法(转)
  11. Nginx启动报错:10013: An attempt was made to access a socket in a way forbidden
  12. USACO Ski Course Design 暴力
  13. Java 建立mysql数据库连接的语句
  14. JS放大镜特效(兼容版)
  15. iOS开发中怎么样使用激光推送
  16. [leetcode-624-Maximum Distance in Arrays]
  17. 点击截图功能 js canvas
  18. 适用于单片机的数据加密算法:xxtea
  19. IDEA 中tomcat日志位置
  20. 谈谈java程序代码保护及license设计

热门文章

  1. 电脑丢失api-ms-win-core-libraryloader-|1-1-1.dll怎么办
  2. 「PKUWC 2018」Minimax
  3. GDI+学习---1.初识GDI+
  4. java.lang.Enum
  5. redis-deskmanager 连不上 虚拟机 - centos redis
  6. F - Auxiliary Set HDU - 5927 (dfs判断lca)
  7. super和this的区别
  8. Java类加载双亲委托模式优点
  9. 基于ATT和CK™框架的开放式方法评估网络安全产品
  10. 设置LISTControl控件某一行的背景和文字颜色