microsoft-ui-reactor  by microsoft

Build WinUI desktop apps with a declarative C# framework

Created 1 month ago
351 stars

Top 79.2% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

Microsoft UI Reactor is an experimental C# framework for building WinUI 3 desktop apps declaratively. It brings patterns like co-located state and type-safe UI composition, familiar to React/SwiftUI developers, to WinUI. Reactor enables full C# IntelliSense and refactoring while seamlessly interop-ing with existing WinUI XAML/MVVM codebases, offering a modern development experience.

How It Works

Reactor uses a virtual element tree and reconciler to efficiently update WinUI controls. Its C# DSL replaces XAML with typed factory methods and fluent modifiers. State management is co-located with render logic via hooks (UseState, UseEffect), eliminating ViewModel boilerplate and leveraging C#'s compile-time safety for UI development.

Quick Start & Requirements

  • Installation: Build from source via bootstrap.ps1 (approx. 3 mins). Clone repo, run .\bootstrap.ps1, then dotnet new reactorapp, cd MyApp, dotnet run.
  • Prerequisites: .NET SDK, PowerShell.
  • Links: GitHub Repository

Highlighted Details

  • Core Reconciler (Preview): Virtual DOM, element pooling, render coalescing, skip-unchanged optimizations.
  • Hooks & State (Preview): UseState, UseReducer, UseEffect, etc., for state management.
  • Flex Layout (Preview): C# port of Facebook's Yoga engine.
  • Charting (Preview): Declarative DSL for charts based on D3 algorithms.
  • Live Preview: Hot-reloading via CLI (--preview) and VS Code extension.

Maintenance & Community

Currently "Experimental" with an expected 3-6 month iteration target. Contributions and feedback are welcome. Hosted on GitHub with all code, specs, and tests public.

Licensing & Compatibility

  • License: MIT.
  • Compatibility: Seamless interop with WinUI XAML/MVVM apps; content can be hosted bidirectionally.

Limitations & Caveats

Experimental, pre-1.0; public APIs may change. Requires building from source (no NuGet). Feature maturity varies ("Draft"/"Early" areas may evolve significantly).

Health Check
Last Commit

13 hours ago

Responsiveness

Inactive

Pull Requests (30d)
250
Issues (30d)
89
Star History
352 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.