RepoMicrosoftMicrosoftpublished Apr 16, 2026seen 5d

microsoft/microsoft-ui-reactor

C#

Open original ↗

Captured source

source ↗
published Apr 16, 2026seen 5dcaptured 14hhttp 200method plain

microsoft/microsoft-ui-reactor

Description: Reactor is an experimental set of extensions to WinUI

Language: C#

License: MIT

Stars: 465

Forks: 27

Open issues: 50

Created: 2026-04-16T21:22:49Z

Pushed: 2026-06-11T01:52:06Z

Default branch: main

Fork: no

Archived: no

README:

Microsoft.UI.Reactor

A declarative, component-based C# framework for building WinUI 3 desktop apps.

Status: Experimental · April 2026

---

What Reactor is — and isn't

Reactor is not a new UI platform. It is a new way to *describe* WinUI content. Every control you render is a real WinUI control — Button, TextBox, NavigationView, TreeView — just authored differently. Apps built with Reactor interop freely with XAML, MVVM, existing controls, and the rest of the WinUI ecosystem.

What Reactor adds on top of WinUI:

  • A virtual element tree and reconciler that diff old vs. new descriptions and patch only what changed on real WinUI controls
  • Hooks-based state (UseState, UseEffect, UseReducer, …) co-located with render logic
  • A C# DSL that replaces XAML markup with typed factory methods and fluent modifiers
  • Higher-level building blocks — flex layout, charting, commanding, navigation, data grid, theming, localization — many of which are candidates to migrate back into WinUI itself
using Microsoft.UI.Reactor;
using Microsoft.UI.Reactor.Core;
using static Microsoft.UI.Reactor.Factories;

ReactorApp.Run("Hello Reactor");

class MyApp : Component
{
public override Element Render()
{
var (count, setCount) = UseState(0);

return VStack(
Heading($"Count: {count}"),
HStack(8,
Button("-", () => setCount(count - 1)),
Button("+", () => setCount(count + 1))
)
);
}
}

No App.xaml. No MainWindow.xaml. No code-behind. No ViewModels. Just C# with full IntelliSense, refactoring, and compile-time type safety.

---

XAML and MVVM are not going anywhere

WinUI is a powerful native platform, and the XAML + MVVM programming model is a great fit for a large portion of the WinUI user base. Tooling, designer support, templating, data binding, and years of guidance, samples, and third-party controls are built around it. Reactor does not try to replace any of that.

What Reactor does target is a specific gap: developers coming from React, SwiftUI, or Jetpack Compose expect co-located state, declarative composition, and type-safe UI construction. Reactor brings those patterns to WinUI without asking anyone to abandon the platform they already ship on. The two models coexist:

  • If you're shipping XAML/MVVM today, keep shipping XAML/MVVM. The investments we're making in Reactor — improved accessibility APIs, richer theming, better commanding, a stronger data stack — are designed to flow back into WinUI so you benefit too.
  • If you want a functional MVU model with no XAML and no ViewModels, Reactor is a path to get there on the same runtime, with the same controls, in the same process.
  • If you want both, you can host Reactor content inside a XAML app, or drop XAML content inside a Reactor app. They share the visual tree.

Many of the experiments in this repo — the charting stack, accessibility validators, commanding, flex layout, theming tokens — are likely to land in WinUI directly, where they'll work for XAML and MVVM users too. Others may continue to ship through Reactor. Either way, WinUI is the foundation.

---

Quick start

Reactor ships the public preview package Microsoft.UI.Reactor version 0.1.0-preview.4 on NuGet.org. The project template is still installed from source for now; bootstrap.ps1 installs the mur CLI, packs/registers the local reactorapp template, and that template references the public preview package by default.

git clone https://github.com/microsoft/microsoft-ui-reactor.git
cd microsoft-ui-reactor

# calling the bootstrap system under the correct PowerShell version you're on
& (Get-Process -Id $PID).Path -ExecutionPolicy Bypass -File .\bootstrap.ps1

dotnet new reactorapp -n MyApp
cd MyApp
dotnet run -p:Platform=x64

> ⚠️ Platform flag required: Always build with an explicit platform: > dotnet build -p:Platform=x64 (or ARM64). Omitting -p:Platform=... > causes WindowsAppSDKSelfContained errors. This applies to dotnet build, > dotnet run, and mur check invocations alike.

bootstrap.ps1 packs mur as a dotnet tool global install (cross-shell PATH, no per-arch $env:Path edits), packs local framework snapshots plus project templates into local-nupkgs/, registers the dotnet new reactorapp template, and installs the Reactor agent plugin under ~/.claude/plugins/reactor. Apps created by the template reference Microsoft.UI.Reactor 0.1.0-preview.4 from NuGet.org by default; pass --MSUIReactorVersion 0.0.0-local when you intentionally want a scaffolded app to consume the local source-built package instead. The optional Microsoft.UI.Reactor.Advanced and Microsoft.UI.Reactor.Devtools sibling packages are version-matched to the framework package when published. Re-run bootstrap.ps1 (or mur upgrade for a lighter refresh) after git pull when you want updated local templates or CLI/plugin bits. Verify a working developer install with mur doctor.

Prefer to wire it up by hand? [Getting Started](https://microsoft.github.io/microsoft-ui-reactor/getting-started/#manual-setup) has a no-magic walkthrough of the exact dotnet pack / dotnet tool install / dotnet new install calls bootstrap.ps1 makes, plus the full hello-world → todo → calculator tour.

Release owners: see the [release runbook](docs/contributing/release-runbook.md) before minting a new version tag.

---

What's included

Reactor spans a core framework and a set of higher-level features. Each area below is labeled by its current maturity — *Preview* is the most mature, then *Draft*, then *Early*. All areas are pre-1.0 and the public API surface may change without notice while the project is labeled experimental.

| Area | What it does | Maturity | |---|---|---| | Core reconciler | Virtual element tree, keyed diffing, element pooling, render coalescing, skip-unchanged optimization | Preview | | DSL & elements | Factory methods covering WinUI controls, fluent modifier chains, attached properties | Preview | | Hooks & state | UseState, UseReducer, UseEffect, UseMemo, UseRef, UseObservable, UseCollection | Preview | | Flex layout | C# port of facebook/yoga with FlexPanel, 590 ported…

Excerpt shown — open the source for the full document.

Notability

notability 5.0/10

New repo, moderate stars