Skip to content

Commit

Permalink
Use ReactiveInjectibleComponentBase<TViewModel>
Browse files Browse the repository at this point in the history
  • Loading branch information
worldbeater committed Sep 29, 2020
1 parent 9e71a3d commit d4c618b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/ReactiveMvvm.Blazor/Views/FeedbackView.razor
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@page "/"
@namespace ReactiveMvvm.Blazor.Views
@inherits ReactiveComponentBase<FeedbackViewModel>
@inherits ReactiveInjectableComponentBase<FeedbackViewModel>

<div class="col-lg-6">
<h1>Feedback Form</h1>
Expand Down
13 changes: 3 additions & 10 deletions src/ReactiveMvvm.Blazor/Views/FeedbackView.razor.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
using Microsoft.AspNetCore.Components;
using ReactiveMvvm.ViewModels;
using ReactiveMvvm.ViewModels;
using ReactiveUI;
using ReactiveUI.Blazor;

namespace ReactiveMvvm.Blazor.Views
{
public partial class FeedbackView
public partial class FeedbackView : ReactiveInjectableComponentBase<FeedbackViewModel>
{
public FeedbackView() => this.WhenActivated(disposables => { });

[Inject]
public FeedbackViewModel Parameter
{
get => ViewModel;
set => ViewModel = value;
}
}
}

0 comments on commit d4c618b

Please sign in to comment.