days
-4
-3
hours
-1
-5
minutes
-3
-7
seconds
-4
-1
search
Sneak peek at React Native internals

React Native’s open source roadmap revealed

Gabriela Motroc
React Native
© Shutterstock / A3pfamily

React Native has had a pretty busy year. Earlier this year, it was announced that this framework would undergo a new internal re-architecture and now that 2019 is almost upon us, it’s time to have a look at the present, past, and future of React Native.

The past few years have been a winding road for React Native but things are shaping up nicely.

We already know that React Native has been focusing on a large scale re-architecture but now’s the time to have a look at the team’s long-term vision for this JavaScript framework for writing natively rendering mobile applications for iOS and Android in open source.

What to expect from React Native in the future

The team’s “to-accomplish” list includes the following:

  • A healthy GitHub repository. Issues and pull requests get handled within a reasonable period of time.
    • Increased test coverage.
    • Commits that sync out from the Facebook code repository should not break open source tests.
    • A higher scale of meaningful community contributions.
  • Stable APIs, making it easier to interface with open source dependencies.
    • Facebook uses the same public API as open source
    • React Native releases that follow semantic versioning.
  • A vibrant eco-system. High quality ViewManagers, native modules, and multiple platform support maintained by the community.
  • Excellent documentation. Focus on helping users create high quality experiences, and up-to-date API reference docs.

In order to turn these ideas into reality, the team is planning on focusing on a few areas including lean code, public API, testing infrastructure and more.

SEE ALSO: New React Native tool coming your way — Vasern joins the party

Lean code

By removing non-core and unused components, the surface area of React Native will be reduced. Non-core components will be transferred to the community to allow it to move faster, as explained in the blog post announcing the open source roadmap. This should make it easier to manage contributions to React Native.

One such example is WebView; the team is currently working on a workflow which will allow internal teams to continue using these components after we remove them from the repository. But this is just one example; there are a bunch of components that will have the same fate so if you want to read more about it, head over to “The Slimmening” (a.k.a the idea of moving UI components and Native Modules into separate repos). 

Open sourcing internals and updated tooling

Facebook is releasing some internal tools and will be improving support for tools popular with the open source community.

The list of projects includes

  • Open source JSI and enable the community to bring their own JavaScript VMs, replacing the existing JavaScriptCore from RN’s initial release.
  • Support 64-bit libraries on Android.
  • Enable debugging under the new architecture.
  • Improve support for CocoaPods, Gradle, Maven, and new Xcode build system.

Testing infrastructure

When code is published by Facebook engineers, they consider it safe to land if it passes all tests, which are meant to identify whether a change might break one of their own React Native surfaces. This, of course, doesn’t mean it will have the same result when used by people who don’t work at the tech giant.

In order to prevent code that breaks these tests from making it to open source, they are shoring up their internal tests. Furthermore, they’ve promised to work on infrastructure to enable better testing of the core repo on GitHub, enabling future pull requests to easily include tests.

Public API

“Facebook will consume React Native via the public API, the same way open source does, to reduce unintentional breaking changes,” according to the blog post. They are already converting internal call sites to address this and their goal is to converge on a stable, public API, leading to the adoption of semantic versioning in version 1.0.

Communication

If you’re unhappy with the React Native documentation, you should know that even though it has not been a priority so far, they plan on changing that. First items on the agenda are to

For more details about the plans for React Native, check out this blog post. And since nothing happens overnight, the projects mentioned above are likely to arrive “throughout the next year or so.” The team is already working on some but others will take more time to finish. However, the important thing is that the wheels are in motion.

Author
Gabriela Motroc
Gabriela Motroc is editor of JAXenter.com and JAX Magazine. Before working at Software & Support Media Group, she studied International Communication Management at the Hague University of Applied Sciences.

Leave a Reply

Be the First to Comment!

avatar
400
  Subscribe  
Notify of