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