Skip to content

ReactiveUI Handbook

The handbook teaches ReactiveUI one topic at a time. Every page starts from a runnable example project in the ReactiveUI repository. Each code block on a page is copied from that project, and the text under it shows what the code prints. To see a page's code run, clone the repository and run its project:

dotnet run --project src/examples/Documentation/Pages/commands

The examples use small apps you already know: a to-do list, a school, a library, a shop, a recipe book and a music player. The data is in memory, so nothing needs a server.

Start here

Read these in order. Together they build a complete app.

PageWhat you learn
Starting an appStart ReactiveUI with the app builder and choose its services.
RegistrationRegister your own services, views and view models.
View modelsWrite a view model the view can bind to.
CommandsRun an action from a button, with its state and errors.
Data bindingKeep a view and its view model in step.
WhenActivatedStart work when a view appears and stop it when the view goes away.
InteractionsLet a view model ask the view a question.
RoutingMove between pages and go back.
View locationFind the view for a view model.

Topics

PageWhat you learn
CollectionsReact to items added to and removed from a list.
Message busSend messages between parts of an app that do not know each other.
SchedulingChoose which thread work runs on.
Data persistenceSave and restore the app's state when the operating system pauses or closes it.
Default exception handlerDecide what happens to an error nobody handles.
TestingTest view models without a UI.
PlatformsUse ReactiveUI with WPF, Windows Forms, WinUI, MAUI, Blazor and Android.
Members that need reflectionWhich members do not work with trimming or Native AOT, and what to use instead.

Each of these libraries has its own repository and its own section.

To move an existing app to this version, see Upgrading.