News

React Native Windows Team 'Dogfoods' New Update

Microsoft's React Native for Windows dev team announced an update in which the developer experience was improved in part by "dogfooding," referring to the practice of teams using the very same application they created.

Serving as a testament to Microsoft's relatively new embrace of open source technologies, the company's React Native for Windows (and macOS) extension tooling facilitates the use of the popular open source React Native project created by Facebook that burst onto the scene in 2015 with a new way to create mobile apps with JavaScript and the React UI library. That new way followed a "learn once, write anywhere" approach in which the same techniques were used to build native apps for Android, iOS and so on, as opposed to the traditional "write once, run anywhere" cross-platform paradigm.

Microsoft's GitHub rep for the project says it supports the Windows 10 SDK, so it can be used for web, enterprise or gaming apps targeting devices running that OS including PCs, tablets, 2-in-1s, Xbox, Mixed Reality devices (including HoloLens), Surface Hub and more. Apps can be run from within the Visual Studio IDE or without it.

With the advent of React Native 0.64, Microsoft's dev team highlighted the work done to support more community modules, TurboModules, API improvements and tools.

"There's been a lot of work on improving the developer experience, as that's been a focus for us as a whole across all our frameworks and platforms, and React Native for Windows is no exception!" the team said in a blog post earlier this month. "Through tooling, dogfooding our own work, and 'under the hood' improvements, we're looking forward to sharing with you some of the highlights in this release that we're especially proud to announce."

Among those highlights is easier use of Hermes, an open source JavaScript engine optimized for running React Native apps on Android, support for which is still experimental.

Also new is a React Native Gallery app the team created to show off all the functionality of the Windows tool while helping development efforts, such as cross-platform module testing,

React Native Gallery in Animated Action
[Click on image for larger, animated GIF view.] React Native Gallery in Animated Action (source: Microsoft).

"Much like the XAML Controls Gallery for WinUI, we intend to have the React Native Gallery be available not only as a proving ground for our own work, but also a place where native and JavaScript components alike can be seen in action in the Windows ecosystem. This includes providing lightweight code snippets on each page for developers to copy out and use in their own scenarios."

The aforementioned TurboModules, meanwhile, is another experimental feature that serves to allow JavaScript code to load modules only when needed, among other functionality. "We now have support for C++ JSI TurboModules using the same TurboModule interface that is available on Android and iOS. Since these APIs haven't been fully shipped or documented in React Native core yet, these APIs are subject to change."

Other highlights include API parity, with more component properties supported by other platforms now working on Windows, expanded documentation and more.

Other new features include:

  • 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.

More information is provided in the above-linked blog post, web site and GitHub repo, along with documentation including Get Started with Windows.

For VS Coders, the React Native Tools extension is available in the code editor's marketplace, installed nearly 2 million times.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube