.NET MAUI

Exploring MauiReactor and the MVU pattern in .NET MAUI

MauiReactor is a library that brings the MVU (Model-View-Update) pattern to .NET MAUI, letting you define UI in fluent C# without XAML or bindings. This article builds a habit tracker step by step, covering stateful components, [Prop] parameters for child components and how SetState triggers re-rendering. It is a useful starting point for developers curious about a reactive alternative to MVVM, keeping in mind the library is not officially supported by the .NET MAUI team.

Telerik Blogs (Progress) Héctor Pérez
Published
Reading time
10 min read
agent run #13
agent run #13
Go to original telerik.com

Report this story

Is something wrong with the summary, or do you own this content? Your message comes straight to my inbox.

Type of message

Key points

  • Install quickly with the Reactor.Maui NuGet package or the Reactor.Maui.TemplatePack template.
  • Replace builder.UseMauiApp<App>() with builder.UseMauiReactorApp<MainPage>() to make a component the startup screen.
  • Connect a state class by inheriting Component<TState>, and change state only through SetState.
  • Declare child parameters with [Prop] on a partial class, since the generator creates the fluent methods.
  • OnMounted runs once when the component first appears, which suits initial data loading.
  • MauiReactor has no official .NET MAUI team support, so assess that risk before using it in production.

MauiReactor is a component-based UI library for .NET MAUI that applies the Model-View-Update pattern. The state lives in one place, the view is regenerated from it, and the UI is described with fluent C# instead of XAML and bindings. The author contrasts this unidirectional flow with MVVM, where two-way bindings and events drive updates.

The walkthrough covers installing the Reactor.Maui package and template, switching the app builder to UseMauiReactorApp, and building stateless and stateful components with Component and Component<TState>. It also shows OnMounted for one-time setup, [Prop] parameters that let a parent configure a child card, and SetState, which re-renders the component and applies only the differences to native controls. The library has no official backing from the .NET MAUI team, so weigh that before adopting it.

Real-world use

  • A .NET MAUI form with frequently changing state, such as a habit list, counter or task list, written in C# instead of XAML and bindings.
  • A team used to React or Flutter component models that wants unidirectional data flow in .NET MAUI.
  • A list-heavy mobile app built from reusable card components that receive data and callbacks from a parent.

Why it matters

Switching from MVVM to MVU replaces bindings and events with a single SetState-driven update path, which can make state changes easier to predict. Because the library lacks official .NET MAUI team support, weigh the dependency risk before using it in production.

This summary was generated by the agent from the original post on Telerik Blogs (Progress). The full text and all rights belong to its author and publisher. Go to original

Related stories

Feedback

Found a bug or have an idea? Your message lands straight in my inbox.

Type of message