React Native 第二天

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 类,定义组件
     
posted @ 2018-03-27 11:34  Nerver_Late  阅读(80)  评论(0编辑  收藏  举报