In mid-June, FB announced that they would be refactoring React Native on a large scale, with the aim of making React Native lighter and more suitable for the JavaScript ecosystem. Today, Facebook officially unveiled some details of their plans:

1. Make RN’s GitHub repository healthier, issues and pull requests will be processed in a timely manner;

  • Improve test coverage

  • Commits synchronized from the Facebook code repository cannot violate open source testing guidelines

  • Increase community contributions

2. Stabilize the API to make it easier to interact with open source dependencies;

  • Facebook uses the same public API as open source

  • React Native will follow the semantic versioning standard

3. To make the ecosystem more dynamic, the community will provide high-quality ViewManagers, native modules and multi-platform support;

4. Documentation optimization, with a focus on helping users create a high-quality experience, and the latest API reference documentation.

The core target

The RN team’s goal is to simplify RN by removing non-core and useless components, move non-core components to the community and make them easier for developers to use, and they have now decided to keep ownership of these components in the community:

https://github.com/react-native-community/discussions-and-proposals/issues/6

WebView is an example of this:

https://github.com/react-native-community/discussions-and-proposals/blob/master/proposals/0001-webview.md

At the same time, the RN team is developing a workflow that will allow internal teams to continue using these components even after they are removed from the repository.

Open source internal development tools

Because Facebook internal developers use internal development tools, the development experience is completely different from that of open source, and those tools that are popular in the open source community may not be used by Facebook developers, and in some cases, The Facebook team has become accustomed to using tools that are only available within Facebook, and this internal and external difference can greatly affect their subsequent refactoring efforts.

To this end, they made the following improvements:

  • Open source JSI allows the community to use their own JavaScript VMs to replace existing JavaScriptCore from the original version of RN. JSI will be published in the future.

  • Support for 64-bit libraries on Android

  • Debugging is supported under the new architecture

  • Improved support for CocoaPods, Gradle, Maven, and the new Xcode build system

Build test infrastructure

When Facebook engineers release code, the code is considered ready to go live if it passes all the tests that determine if some changes will break React Native. Due to differences in the way Facebook uses React Native, They may have unknowingly broken React Native in the open source environment.

To that end, Facebook will support internal testing to make sure they run as close to open source as possible. This will help prevent corrupted code from being open source. At the same time, they will be working on building a test infrastructure to better test the core repository on GitHub so that future pull requests can be included in the tests.

Using a public API

Facebook will use React Native via a public API, as well as open source, to reduce unintentional and disruptive changes. Their goal is to incorporate a stable public API and adopt semantic versioning standards in V1.0.

Strengthen communication

React Native is one of the most open source projects on GitHub by number of contributors (# 2), and Facebook will continue to work on contribution-related initiatives such as transparency and open discussion going forward. Documentation can be a big problem for beginners, so RN will create automatically generated API reference documentation to improve the user experience.

The RN team says that these projects should be completed by next year. The JSI project is already underway, and other improvements, such as simplifying RN, need more time to complete. Developers can discuss any questions in the proposal:

https://github.com/react-native-community/discussions-and-proposals

Refer to the link

http://facebook.github.io/react-native/blog/2018/11/01/oss-roadmap