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

Switch to CommunityToolkit.Mvvm #116

Open
alikoli opened this issue Aug 17, 2022 · 2 comments
Open

Switch to CommunityToolkit.Mvvm #116

alikoli opened this issue Aug 17, 2022 · 2 comments
Labels
type: feature New feature or enhancement
Milestone

Comments

@alikoli
Copy link

alikoli commented Aug 17, 2022

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

@alikoli alikoli added status: triage Needs to be triaged type: feature New feature or enhancement labels Aug 17, 2022
@klemmchr klemmchr removed the status: triage Needs to be triaged label Aug 19, 2022
@klemmchr
Copy link
Owner

Thanks for the heads up, I already had a look at the release and I'm planning to implement this in the next major version. However, this will need a bigger refactoring of the whole library than just changing out some classes. The community toolkit has way more features than this library so they would need to be supported first.

@klemmchr klemmchr added this to the 7.0 milestone Aug 19, 2022
@Sen-Gupta
Copy link

Bringing Community Toolkit is akin to adding firepower to this.

I liked your implementation and with community toolkit baked in, it just can't get better!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature New feature or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants