ReactiveUI.WinUI
24.2.0
Prefix Reserved
dotnet add package ReactiveUI.WinUI --version 24.2.0
NuGet\Install-Package ReactiveUI.WinUI -Version 24.2.0
<PackageReference Include="ReactiveUI.WinUI" Version="24.2.0" />
<PackageVersion Include="ReactiveUI.WinUI" Version="24.2.0" />
<PackageReference Include="ReactiveUI.WinUI" />
paket add ReactiveUI.WinUI --version 24.2.0
#r "nuget: ReactiveUI.WinUI, 24.2.0"
#:package ReactiveUI.WinUI@24.2.0
#addin nuget:?package=ReactiveUI.WinUI&version=24.2.0
#tool nuget:?package=ReactiveUI.WinUI&version=24.2.0
<br> <a href="https://github.com/reactiveui/reactiveui"> <img width="160" heigth="160" src="https://raw.githubusercontent.com/reactiveui/styleguide/master/logo/main.png"> </a> <br>
What is ReactiveUI?
ReactiveUI is a composable, cross-platform model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming, which is a paradigm that allows you to abstract mutable state away from your user interfaces and express the idea around a feature in one readable place and improve the testability of your application.
π¨ Get Started π Install Packages π Watch Videos π View Samples π€ Discuss ReactiveUI
Documentation
- RxSchedulers - Using ReactiveUI schedulers without RequiresUnreferencedCode attributes
Book
There has been an excellent book written by our Alumni maintainer Kent Boogart.
NuGet Packages
Install the following packages to start building your own ReactiveUI app. <b>Note:</b> some of the platform-specific packages are required. This means your app won't perform as expected until you install the packages properly. See the <a href="https://reactiveui.net/documentation/getting-started/installation/">Installation</a> docs page for more info.
| Platform | ReactiveUI Package | NuGet |
|---|---|---|
| .NET Standard | ReactiveUI | |
| Any | ReactiveUI.SourceGenerators | |
| Unit Testing | ReactiveUI.Testing | |
| WPF | ReactiveUI.WPF | |
| WinUI | ReactiveUI.WinUI | |
| MAUI | ReactiveUI.Maui | |
| Windows Forms | ReactiveUI.WinForms | |
| AndroidX | ReactiveUI.AndroidX | |
| Blazor | ReactiveUI.Blazor | |
| Platform Uno | ReactiveUI.Uno | |
| Platform Uno | ReactiveUI.Uno.WinUI | |
| Avalonia | ReactiveUI.Avalonia | |
| Any | ReactiveUI.Validation | |
| Any | ReactiveUI.Extensions |
Choosing a distribution: ReactiveUI.Primitives or System.Reactive
ReactiveUI ships in two interchangeable distributions with an identical public API, both built on the same ReactiveUI.Primitives engine and the same high-performance custom schedulers/sinks. The only difference is which reactive interop types appear in the public API β so you pick a distribution, you don't rewrite code:
| You want⦠| Reference these packages | Public reactive types |
|---|---|---|
| The new, lighter default (no System.Reactive dependency) | ReactiveUI, ReactiveUI.Wpf, ReactiveUI.WinForms, ReactiveUI.WinUI, ReactiveUI.Maui, ReactiveUI.Blazor, ReactiveUI.AndroidX, β¦ |
ReactiveUI.Primitives β RxVoid, ISequencer, Signal<T> |
| Drop-in interop with existing System.Reactive code | ReactiveUI.Reactive, ReactiveUI.Wpf.Reactive, ReactiveUI.WinForms.Reactive, ReactiveUI.WinUI.Reactive, ReactiveUI.Maui.Reactive, ReactiveUI.Blazor.Reactive, β¦ |
System.Reactive β Unit, IScheduler |
The .Reactive family is not "old ReactiveUI" β it runs on the exact same Primitives engine and custom
schedulers as the default and simply surfaces System.Reactive.Unit/IScheduler (and Subject<T>) so it composes
with code that already uses System.Reactive.
The default distribution drops the System.Reactive dependency for a smaller closure and a better trimming/AOT
story, and is markedly faster on the hottest MVVM paths β in representative micro-benchmarks roughly 3β4Γ faster
on WhenAnyValue/ToProperty subscribe and emit, with 5β13Γ less allocation (for example WhenAnyValue emit
drops from ~6.8 MB to ~0.5 MB per run, and ToProperty construction from ~7.3 Β΅s to ~1.0 Β΅s). The fast schedulers
now live in ReactiveUI.Primitives and back both distributions.
If you take the default packages, note the public reactive types change: IScheduler β ISequencer,
System.Reactive.Unit β RxVoid, and Subject<T>/BehaviorSubject<T> β Signal<T>/BehaviorSignal<T>. To upgrade
with zero source changes, reference the matching *.Reactive packages instead β they keep IScheduler, Unit
and Subject<T>.
Core routing (RoutingState, IScreen, RoutedViewHost) stays in the main package, but the DynamicData change-set
routing/collection/auto-persist helpers now live in a separate ReactiveUI.Routing package (ReactiveUI.Routing.Reactive
for the System.Reactive flavor), so core no longer depends on DynamicData. Add ReactiveUI.Routing if you use those
extensions.
Analyzers are opt-in
The ReactiveUI packages reference ReactiveUI.Primitives with ExcludeAssets="analyzers", so the analyzers that ship
inside ReactiveUI.Primitives do not flow to your project and will not run against your code just because you
installed ReactiveUI. We don't impose our analyzers on downstream consumers. If you want them, opt in explicitly by
adding a direct reference to ReactiveUI.Primitives (without excluding the analyzer assets), e.g.:
<PackageReference Include="ReactiveUI.Primitives" Version="x.y.z" />
Sponsorship
The core team members, ReactiveUI contributors and contributors in the ecosystem do this open-source work in their free time. If you use ReactiveUI, a serious task, and you'd like us to invest more time on it, please donate. This project increases your income/productivity too. It makes development and applications faster and it reduces the required bandwidth.