Microsoft makes another pitch for React Native in confusing world of Windows desktop development

Microsoft makes another pitch for React Native in confusing world of Windows desktop development
Confused

Microsoft is again encouraging developers to use React Native for Windows desktop development, despite its investment in other approaches using C# or C++.

Software engineer Chiara Mooney has posted about how the Office team uses React Native, saying it has “improved app reliability and upgraded their development experience.” 

Microsoft Office is almost as ubiquitous as Windows and historically has been influential in Windows desktop development, with innovations such as the ribbon UI (user interface) in Office 2007, controversial at the time but eventually widely accepted both in Office and other applications.

Windows developers have often observed though that the Office team within Microsoft does not embrace the desktop frameworks that the company creates for others. Office never used .NET Windows Forms or WPF (Windows Presentation Foundation), for example.

Today it is the same, with Office mostly built with C++ and React Native, rather than using .NET MAUI (Multi-platform app UI), for example.

A virtualiized list sample in React Native for Windows, part of a gallery obtainable via the Windows Store

Mooney identifies three key advantages for React Native. First, developers can share skills between web and desktop versions of the application by using JavaScript (or perhaps TypeScript, though Mooney does not mention it). Second, React Native enables cross-platform applications that use controls native to the operating system. And third, a feature which Mooney calls content islands allow React Native components to be embedded into existing Windows applications, something which Office takes advantage of.

Despite these advantages, third-party developers have reason to be cautious. The latest React Native release is 0.79, released last month, and having the version number smaller than 1.0 indicates a bleeding edge release, rather than one that is fully production-ready. Last year DevClass spoke to React Native maintainer Lorenzo Sciandra (no longer at Microsoft), who warned that the pace of change is rapid and that developers should be prepared to refactor their applications frequently.

React Native was created by Meta primarily for cross-platform mobile applications, though Microsoft plays a leading role in maintaining the framework for Windows and macOS, with the macOS target important for cross-platform Office.

Microsoft’s Windows implementation of React Native is hooked to the Windows App SDK, giving easy access to a modern user interface in the style of Windows 11 and using Microsoft’s Fluent UI design language. 

The Windows App SDK has downsides though, one being that it requires Windows 10 1809 or higher for deployment. In an enterprise context that should not cause problems, yet it is worth noting that “the Windows App SDK doesn’t replace the Windows SDK or existing desktop Windows app types such as .NET (including Windows Forms and WPF) and desktop Win32 with C++.” Retreating to those older technologies does have advantages, for developers more concerned with wide compatibility than with adopting the latest look and feel.

There are also options other than React Native for developers wishing to code cross-platform desktop applications in JavaScript or TypeScript. Microsoft’s Visual Studio Code is an example, using Electron to create an application for macOS, Windows and Linux. Electron embeds the Chromium browser engine and Node.js.

It is important for Microsoft that the Office applications show off what the company considers the “fullest expression of the Windows experience,” to use Mooney’s words, and she makes the case for React Native as a good way of doing that while also sharing code across platforms. Equally, there are not as many developers outside Microsoft who have that same need. Developers of consumer or line of business applications can be more pragmatic; their users will care more about reliability and usability than how well the results conform to the Fluent Design system.

Windows remains a hugely popular platform, but the trend is towards more diversity, partly thanks to mobile devices, and partly thanks to the rise of other platforms including web, ChromeOS and more. The implication is that while cross-platform development is of increasing importance, following Microsoft’s lead is less so.