React Native 诞生于 2013 年的 Facebook 内部黑客马拉松(hackathon):html
In the essence of Facebook’s hacker culture, React Native started as a hackathon project in the summer of 2013.
(摘自In the beginning: React Native’s roots)前端
随着 React 的大规模应用,Facebook 愈加感觉到 React 以及 Web 技术的优点,但愿 Native 开发也能像 Web 同样Move fast:react
为了达成这个目的,Facebook 尝试了 3 种方案:android
而React Native,就是第三种方案的最终成果git
2015 年 1 月的 React.js Conf 上,这个内部项目首次公布,并在 5 月的 F8 Conference 上正式开源github
最初只支持 iOS,同年 9 月支持了 Androidweb
<Button />
组件及Yarn支持Microsoft UWP 和 Samsung Tizen 的支持,意味着React Native 从移动端走向了 PC(Win 10)、游戏机(Xbox One)、手环(Gear Fit 2)、智能电视机(SUHD)甚至全息眼镜(HoloLens)typescript
此外,开发体验、性能、API 能力等都在快速迭代中不断提高windows
创建了月度迭代计划,以及按期召开包括社区团队在内的月会。性能仍然是一个重要方向,动画、List View 等重要更新都涉及性能优化react-native
另外,还开始了编译时的性能优化探索,如Prepack,指望大幅削减 React Native core 的初始化耗时:
We plan to bring the cost of the React Native bridge close to zero via projects like Prepack and more build time processing.
为了更好地支持 Native & React Native 混合 App,核心团队启动了架构升级计划(Fabric),包括重构线程模型、支持 React async rendering 能力、简化 React Native core 等大改。同时,Facebook 也计划开源包括 JSI 在内的一些基础设施,具体见Open Sourcing Internals and Updated Tooling
另外一方面,开源社区的管理也走向正规化,包括版本管理、RFC、交流讨论等
在开源社区的参与下,架构升级计划进展迅速,部分非核心模块从 React Native Core 拆出去独立维护,而且效果不错:
These modules are getting more support than they ever did within React Native, showing that this is a great step for the community.
同时,性能优化从未停歇,甚至换用Hermes做为 Android 平台的 JS 引擎(以前 Android 也用 JavaScriptCore),以求进一步的性能提高:
Hermes is an open-source JavaScript engine optimized for running React Native apps on Android. For many apps, simply enabling Hermes will result in improved start-up time, decreased memory usage, and smaller app size.
关注「前端向后」微信公众号,你将收获一系列「用心原创」的高质量技术文章,主题包括但不限于前端、Node.js以及服务端技术
本文首发于 ayqy.net,原文连接 http://www.ayqy.net/blog/the-...