Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.

Switch to CommunityToolkit.Mvvm #116

@alikoli

Description

@alikoli

Feature description

Right now all the code generators are written from scratch. As version 8 of CommunityToolkit.Mvvm is oficialy released it would be great to use it. We could use NotifyPropertyChangedFor, mesaging, and other goodnes which is going to come in future releases.

Code sample

  1. Necessary change in ViewModelBase:
[INotifyPropertyChanged]
public abstract partial class ViewModelBase
{

and removal of INotifyPropertyChanged stuff as CommunityToolkit.Mvvm does it for us.
2. There is a need to change Set to SetProperty (so it introduces breaking change)
3. [Notify] must be changed to [ObservableProperty]

I created working repo:
https://github.com/alikoli/MvvmBlazor-with-CommunityToolkit.Mvvm

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featureNew feature or enhancement

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions