React Native Windows: react-native-windows_v0.64.0 Release

Release date:
March 15, 2021
Previous version:
react-native-windows_v0.64.0-preview.15 (released March 12, 2021)
Magnitude:
203 Diff Delta
Contributors:
3 total committers
Data confidence:
Commits:

Top Contributors in react-native-windows_v0.64.0

rnbot
NickGerleman
jonthysell

Directory Browser for react-native-windows_v0.64.0

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

We're excited to release React Native Windows 0.64.0, targeting React Native 0.64.0. There have been more new features, bugfixes, and enhancements than we can count, with some of the significant ones listed below.

Getting Started documentation here Release notes for React Native 0.64 here

What's new

  • Easy opt-in to Hermes: It's easier than ever to try Hermes! We expect projects trying Hermes to see performance increases in most cases. While there are teams using Hermes in production, its support is still experimental, and we do not yet support Hermes debugger or Hermes in C# applications. We would still love to know if you try Hermes and run into any issues.

  • Improved API parity: More component properties supported by other platforms now work on Windows, such as Text backgroundColor, border, and textTransform. An initial version of AccessibilityInfo is now available. Platform.version is now implemented.

  • React 17 and faster startup by default: React Native 0.64 brings the latest version of React, and changes the default metro configuration to enable "inline requires", allowing for faster startup by default.

  • Community module templates: A new workflow makes it easier to create community modules for Windows by using a built-in template.

  • Instance lifecycle events: Native code can now respond to the react native instance being created, loaded, or destroyed.

  • A brand new WebSocket stack: The existing WebSocket stack has been replaced with an all new, more-correct, production-hardened implementation.

  • Bug-fixes and improvements: The above just scratches the surface on the work that has been happening! We've been continually making bug fixes and improvements across the project.

Experimental Features

  • Access to the JSI runtime: C++ applications can now directly interface with the JSI runtime using the winrt::Microsoft::ReactNative::ExecuteJSI API. This will work anywhere a ReactContext is available and web-debugging is not in use.

  • TurboModule compatibility: Existing C++ TurboModules can be used with react-native-windows. Code generation is not yet exposed.

Deprecations

  • 32-bit ARM is deprecated: Some Windows IoT Core devices run 32-bit ARM processors. These devices are rare, and have not been tested with react-native-windows. We will be removing support for ARM32 in a future release. ARM64 remains supported.

Breaking Changes

  • Native module thread affinity: A bug was discovered which led to custom native modules often being invoked on the UI thread. This was unintentional and has been changed. We recognize that this may break existing modules in cases where affinity was relied upon without explicitly queuing to the UI thread. Please let us know if you run into broken community modules.

  • acceptsKeyboardFocus is removed: In 0.63 we started warning on usage of acceptsKeyboardFocus that the property would be replaced by the built-in and type-safe focusable. In 0.64 we removed support from the property, redboxing if it is passed to a view and ignoring the property on touchables.

  • AppTheme API reconciliation with Appearance: React Native 0.62 introduced Appearance and useColorScheme hooks to respond to changes in light/dark mode. This functionality supersedes several APIs in the react-native-windows specific AppTheme library. AppTheme functions that warned about removal in 0.63 are removed in 0.64. See more here on how to write components that adapt to theme.

  • Setting accessibility props no longer makes controls focusable: Previous behavior made any view focusable with accessibility properties set. This is often not the desired effect, and focusable now controls this.

  • EmitJSEvent parameter passing: Calls to EmitJSEvent on the ReactContext previously wrapped the event object in a JavaScript array instead of passing it 1:1. This was fixed in 0.64, but any existing consumption of events fired by EmitJSEvent must be updated.

  • ref.focus() focus visuals: Calling focus() on a component ref will now show native focus visuals by default. If you don't want focus visuals around your component, you can set the property enableFocusRing={false}.

  • Synchronous native module returns: Native module methods marked as synchronous would previously have their results wrapped in an array. This is no longer the case.

Upgrading

The most surefire way to upgrade from 0.62 or 0.63 is to generate a new project targeting 0.64 using react-native-windows-init and copy over your project content. In the future we would like to provide diffs to help make this easier in the style of react-native-upgrade-helper.