Skip to content

React Native open source update: Lean Core, accessibility and CI

updated

The React Native team has published an open source update covering the past six months of work on the project, from contribution numbers to progress on community feedback.

Community activity

Over six months, more than 550 contributors made 2800 commits. About 400 community contributors opened more than 1,150 Pull Requests, and 820 of them were merged. Average Pull Requests per day rose from three to roughly six, even after the website, CLI and many modules were moved out of the main repository. Open Pull Requests now average below 25.

Highlighted contributions

  • Accessibility in 0.60: new accessibility roles and states, a new Accessibility States API, Android support for AccessibilityInfo.announceForAccessibility, extended accessibility actions, iOS accessibility flags and "reduce motion", and Android keyboard improvements via a clickable prop and onClick callback (to be renamed focusable). Text on iOS will be drawn with CALayers, which fixes scaled-up text disappearing.
  • New app screen: a community-designed first-run screen is implemented in 0.60 and links new users to the documentation.
  • TurboModule types: around 40 Pull Requests in just over two weeks added types for flow typed native modules, which the TurboModules system requires for type safety.
  • Haste removal: James Ide planned and sent 18 Pull Requests to remove the haste module system, which allowed importing by global id but was poorly supported by tooling.
  • Android Fragments: support for running React Native via Android Fragments is merged and planned for 0.61.

Lean Core

Lean Core splits modules into separate repositories so they can receive better maintenance: WebView, NetInfo, AsyncStorage, the website and the CLI received more than 800 Pull Requests combined and can ship independently. Obsolete polyfills for features like Map and Set were removed now that a newer JavaScriptCore ships. The JavaScript bundle, which grew from 530kb in 0.54 to 607kb in 0.57, is now 579kb on master. The team says it will be more intentional about adding new APIs.

Progress on user feedback

Responding to the earlier "What do you dislike about React Native?" thread, the team reports:

  • Upgrading: autolinking, a better upgrade flow via rn-diff-purge, an upcoming upgrade helper website, and a plan to publish blog posts for each major release.
  • Performance: a faster JSC landed in 0.59, with work underway to make it easier to enable inline-requires by default.
  • Documentation: a full rewrite has started and contributions are welcome.
  • Xcode warnings: all existing warnings were removed.
  • Hot reloading: the React team is building a new system to be integrated soon.

Debugging and Metro symlink support have not improved as much as hoped; debugging will be prioritized. A new edition of the feedback thread is open for users on the latest version.

Continuous integration

Because changes land in Facebook's internal repository first, and not all open source tests ran inside Facebook, commits synced to GitHub frequently broke open source tests. Héctor Ramos spent two months reworking CI so most open source tests now run before changes are committed internally, keeping GitHub CI more stable.

What's next

Team members will speak at Chain React and React Native EU, and the 0.60 release is described as "right around the corner."

Source: reactnative.dev