Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Blazor
  3. MvvmBlazor

MvvmBlazor

MITC#v6.0.6

A lightweight MVVM framework for building Blazor WebAssembly and Blazor Server applications.

GitHubGitHub
242 stars48 forks0 contributors

What is MvvmBlazor?

MvvmBlazor is a small framework that enables developers to build Blazor WebAssembly and Blazor Server applications using the Model-View-ViewModel (MVVM) pattern. It simplifies development by providing automatic bindings, lifecycle management, and seamless integration with Blazor's component model, aiming to increase development speed while minimizing implementation effort.

Target Audience

Developers building Blazor applications who prefer or require the MVVM architectural pattern, particularly those looking to reduce boilerplate code and manage state and UI updates more efficiently.

Value Proposition

Developers choose MvvmBlazor for its automatic bindings with re-rendering, source generators that reduce boilerplate, and tight integration with Blazor's dependency injection and lifecycle, offering a streamlined MVVM experience compared to manual implementations.

Overview

A lightweight Blazor Mvvm Library

Use Cases

Best For

  • Building Blazor applications with complex state management that benefits from the MVVM pattern.
  • Reducing boilerplate code in Blazor projects through source generators for properties and custom components.
  • Implementing automatic UI updates when data changes, especially with observable collections.
  • Integrating view models with Blazor's dependency injection system for scoped or transient services.
  • Creating custom Blazor components that require MVVM support but must inherit from a different base class.
  • Handling parameter passing and lifecycle methods in view models to mirror Blazor component behavior.

Not Ideal For

  • Projects stuck on .NET versions older than .NET 6, as MvvmBlazor requires .NET 6 or higher.
  • Teams preferring Blazor's standard component model without MVVM for simple, form-based applications.
  • Applications integrated with other state management libraries like Fluxor, where MvvmBlazor might introduce conflicting patterns.
  • Developers using IDEs with poor source generator support, as this can hinder the development experience.

Pros & Cons

Pros

Automatic UI Updates

Bindings automatically trigger component re-rendering when view model properties change, eliminating manual StateHasChanged calls, as shown in the ClockViewModel example with @Bind(x => x.DateTime).

Boilerplate Reduction

Source generators auto-create properties from fields with the [Notify] attribute, cutting down repetitive INotifyPropertyChanged code, though IDE support can be spotty.

Lifecycle Synchronization

View models mirror Blazor component lifecycle methods and handle parameter passing, including type conversion via TypeConverter for strong typing, as detailed in the Parameters section.

DI Integration

View models are registered with Blazor's dependency injection, allowing scoped services like DbContext to be managed with component lifetimes without manual factories.

Cons

IDE Compatibility Issues

Source generators may not be recognized by some third-party IDEs, causing false errors and impairing IntelliSense, a limitation openly noted in the README.

.NET Version Lock-in

Requires .NET 6 or newer, excluding projects on .NET Core 3.1 or .NET 5, which restricts use in legacy or upgrade-resistant environments.

Pattern Enforcement Overhead

Mandates observable collections and property change notifications, adding complexity for data structures that don't fit this model, and can introduce performance overhead in simple apps.

Frequently Asked Questions

Quick Stats

Stars242
Forks48
Contributors0
Open Issues6
Last commit2 years ago
CreatedSince 2019

Tags

#webassembly#csharp#viewmodel#dotnet#blazor-server#mvvm-framework#blazor-wasm#ui-framework#data-binding#source-generators#blazor#mvvm

Built With

.
.NET 6
B
Blazor
C
C++

Included in

Blazor9.3k
Auto-fetched 1 day ago

Related Projects

FluxorFluxor

Fluxor is a zero boilerplate Flux/Redux library for Microsoft .NET and Blazor.

Stars1,465
Forks163
Last commit28 days ago
Blazored.LocalStorageBlazored.LocalStorage

A library to provide access to local storage in Blazor applications

Stars1,331
Forks133
Last commit1 year ago
bUnit - a testing library for Blazor componentsbUnit - a testing library for Blazor components

bUnit is a testing library for Blazor components that make tests look, feel, and runs like regular unit tests. bUnit makes it easy to render and control a component under test’s life-cycle, pass parameter and inject services into it, trigger event handlers, and verify the rendered markup from the component using a built-in semantic HTML comparer.

Stars1,296
Forks119
Last commit3 days ago
Blazor-StateBlazor-State

A Blazor State management library by TimeWarp.

Stars613
Forks57
Last commit4 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub