码迷,mamicode.com
首页 > 其他好文 > 详细

React Native 第二天

时间:2018-03-27 14:43:57      阅读:142      评论:0      收藏:0      [点我收藏+]

标签:index   androi   facebook   pre   http   text   one   版本   font   

1.从版本V0.49.0开始单一的入口文件 index.js替代原有老的index.android.js和index.ios.js文件参考(https://github.com/facebook/react-native/releases/tag/v0.49.0)

2.创建组件

  1. React.creatClass 过时

    Migrating from React.createClass

    When React was initially released, there was no idiomatic way to create classes in JavaScript, so we provided our own: React.createClass.

    Later, classes were added to the language as part of ES2015, so we added the ability to create React components using JavaScript classes. Along with functional   
    components, JavaScript classes are now the preferred way to create components in React.

  2. 函数式
  3. ES6 类,定义组件

   

React Native 第二天

标签:index   androi   facebook   pre   http   text   one   版本   font   

原文地址:https://www.cnblogs.com/NerverLate/p/8656572.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!