Ensure that you install
ReactiveUI.Blazor into your application.
Your ViewModel should inherit from
ReactiveObject or 'ReactiveValidationObject' if you wish to use ReactiveUI.Validation
WhenActivated for lifecycle
Keep references to your subscriptions
Use disposables to manage lifetime, scope and resources:
Your Page (View) should inherit from
: If you want to pass your ViewModel to the page as a parameter or you want to instantiate it to the View, then set the ViewModel property in the Page's code behind.
: If you want that your corresponding ViewModel should be injected by the dependency injection container.
- ReactiveLayoutComponentBase: If you only want to instantiate your ViewModel corresponding to the View, then just set the ViewModel property in the Page's code behind.
Use your normal Blazor concepts that you would usually use in Blazor development. There's also some extension methods which will make your life easier