WinUI 3 Support in RNW
We are working on adding WinUI 3 support for RNW and have made some good progress towards an alpha.
As of June 2020, we support the WinUI 3.0 Alpha release for:
- Creating a new RNW app C++/WinRT app.
- The Playground app is able to build a
WinUI 3Configuration (you can change this in VS). This corresponds to a
Debugbuild but it targets WinUI 3.
Not yet supported
Releasebuilds - this is an in-development feature so it really isn't intended for release/publishing yet. You'll see build breaks when switching to Release since the
WinUI3is based on the
- WinUI 3 Preview builds.
- C# apps. This will require to have the app template use
using Microsoft.UI.Xamlas appropriate.
- NPM package - we need to create NPM package for WinUI 3-enabled
- Native modules support - we need to figure out how community Native Modules will factor into using WinUI 3 - right now it probably won't work to try to mix and match WinUI 2.x (MUXC) with 3.0.
How to create a RNW-on-WinUI 3 app
In order to create a WinUI 3 enabled C++ app, pass the
--useWinUI3 flag when running
react-native-windows-init (you'll pass
--language cpp too to create a C++ app).
npx react-native-windows-init --useWinUI3 --version master --overwrite --language cpp
Follow overall project status in the Re-target onto OSS XAML project.