React Native 第二天

本文介绍了React Native版本v0.49.0的主要更新内容,包括用单一的入口文件index.js替代原有的index.android.js和index.ios.js。此外,还讨论了React.createClass的过时及如何使用ES6类来创建组件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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 类,定义组件
     

转载于:https://www.cnblogs.com/NerverLate/p/8656572.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值