Skip to main content

Package Exports Support in React Native

· 9 min read
Alex Hunt
Alex Hunt
Software Engineer @ Meta

With the release of React Native 0.72, Metro — our JavaScript build tool — now includes beta support for the package.json "exports" field. When enabled, it adds the following functionality:

In this post we'll cover how Package Exports works, and what these changes mean for you as a React Native app developer or package maintainer.

React Native 0.71-RC0 Android outage postmortem

· 7 min read
Nicola Corti
Nicola Corti
Software Engineer @ Meta
Lorenzo Sciandra
Lorenzo Sciandra
Senior Software Engineer @ Microsoft

Now that 0.71 is available, we want to share some key information about the incident that broke Android builds for all React Native versions while releasing the first 0.71 release candidate for React Native & Expo Android builds on November 4th, 2022.

The contributors who helped tackle the incident recently attended a post-mortem meeting to discuss in detail what happened, what we all learned from it, and what actions we are going to take to avoid similar outages in the future.

React Native 0.71: TypeScript by Default, Flexbox Gap, and more...

· 11 min read
Matt Carroll
Matt Carroll
Developer Advocate @ Meta
Nick Gerleman
Nick Gerleman
Software Engineer @ Meta
Nicola Corti
Nicola Corti
Software Engineer @ Meta
Lorenzo Sciandra
Lorenzo Sciandra
Senior Software Engineer @ Microsoft

Today we’re releasing React Native version 0.71! This is a feature-packed release including:

In this post we’ll cover some of the highlights of 0.71.

First-class Support for TypeScript

· 5 min read
Luna Wei
Luna Wei
Software Engineer @ Meta
Nick Gerleman
Nick Gerleman
Software Engineer @ Meta

With the release of 0.71, React Native is investing in the TypeScript experience with the following changes:

In this post we’ll cover what these changes mean for you as a TypeScript or Flow user.

Pointer Events in React Native

· 10 min read
Luna Wei
Luna Wei
Software Engineer @ Meta
Vincent Riemer
Vincent Riemer
Software Engineer @ Meta

Today we are sharing an experimental cross-platform pointer API for React Native. We’ll go over motivations, how it works, and its benefits to React Native users. There are instructions on how to enable and we’re excited to hear your feedback!

It’s been over a year since we shared our many platform vision on the wins of building beyond mobile and how it sets a higher bar for all platforms. During this time, we've increased our investments in React Native for VR, Desktop, and Web. With differences in hardware and interactions on these platforms, it raised the question of how React Native should holistically handle input.

React Native Core Contributor Summit 2022

· 8 min read
Michał Pierzchała
Michał Pierzchała
Head of Technology @ Callstack
Nicola Corti
Nicola Corti
Software Engineer @ Meta

After years of pandemic and online-only events, we really felt it was time to bring the Core Contributors of React Native together!

That’s why at the beginning of September, we gathered some of the active core contributors of React Native, library maintainers, and the Meta’s React Native and Metro teams to the Core Contributor Summit 2022. Callstack hosted the Summit in their HQ in Wrocław, Poland, as a part of the React Native EU conference happening at the same time.

Together with the React Native core team, we devised a series of workshops in which the attendees could participate. The topics were:

  • ​​React Native Codegen & TypeScript Support
  • ​​React Native New Architecture Library Migration
  • ​​React Native Monorepo
  • Metro Web and Ecosystem Alignment
  • Metro Simplified Release Workflow

We were impressed by the amount of knowledge-sharing and collaboration over those two days. In this blog post, we’d like to give you a sneak peek of the results of this gathering.

Announcing React Native 0.70

· 5 min read
Dmytro Rykun
Dmytro Rykun
Software Engineer @ Meta
Thibault Malbranche
Thibault Malbranche
Lead Mobile Engineer @ Brigad
Nicola Corti
Nicola Corti
Software Engineer @ Meta
Lorenzo Sciandra
Lorenzo Sciandra
Senior Software Engineer @ Microsoft

We are excited to release a new version of React Native, 0.70.0. This version comes with several improvements like a new unified configuration for Codegen, Hermes as default engine, and full CMake support for Android builds along with a refresh of the documentation for the New Architecture. Read on to learn more!

Sections

Hermes as the Default

· 5 min read
Michael Leon
Michael Leon
Software Engineer @ Meta

Last October, we announced that we had started work towards making Hermes the default engine for all React Native apps.

Hermes has provided a lot of value to React Native inside of Meta, and we believe the open-source community will benefit as well. Hermes is designed for resource constrained devices and optimizes for start up, app size, and memory consumption. One key difference between Hermes and other JS engines is its ability to compile JavaScript source code to bytecode ahead of time. This precompiled bytecode is bundled inside the binary, and saves the interpreter from having to perform this expensive step during app startup.

Since the announcement, a lot of work has gone into making Hermes better, and today, we are excited to share that React Native 0.70 will ship with Hermes as the default engine. This means that all new projects starting on v0.70 will have Hermes enabled by default. With the rollout coming up in July, we want to work closely with the community and make sure the transition is smooth and brings value to all users. This blogpost will go over what you can expect from the change, performance benchmarks, new features, and more. Note that you don’t need to wait for React Native 0.70 to start using Hermes - you can follow these instructions to enable Hermes on your existing React Native app.

Note that while Hermes will be enabled by default in new React Native projects, support for other engines will continue.

Helping migrate React Native libraries to the New Architecture

· 6 min read
Riccardo Cipolleschi
Riccardo Cipolleschi
Software Engineer @ Meta

tl; dr: We are working on improving the resources supporting the React Native New Architecture. We have already released a repository to help migrate your app (RNNewArchitectureApp) and one for your libraries (RNNewArchitectureLibraries). We are also revamping the New Architecture guide on the Website and we created a GitHub Working Group to answer questions related to the New Architecture.