ReactiveComponentBase class¶
Defined in
Namespace: ReactiveUI.Blazor
Assembly: ReactiveUI.Blazor.dll
Full name: ReactiveUI.Blazor.ReactiveComponentBase<T>
Modifiers: public
Summary¶
A base component for handling property changes and updating the Blazor view appropriately.
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1
Class hierarchy
classDiagram
class ReactiveComponentBase~T~
class ComponentBase
ComponentBase <|-- ReactiveComponentBase~T~
class IViewFor~T~ {
<>
}
IViewFor~T~ <|.. ReactiveComponentBase~T~
class IViewFor {
<>
}
IViewFor <|.. ReactiveComponentBase~T~
class IActivatableView {
<>
}
IActivatableView <|.. ReactiveComponentBase~T~
class INotifyPropertyChanged {
<>
}
INotifyPropertyChanged <|.. ReactiveComponentBase~T~
class ICanActivate {
<>
}
ICanActivate <|.. ReactiveComponentBase~T~
class IDisposable {
<>
}
IDisposable <|.. ReactiveComponentBase~T~
Inherits from: ComponentBase
Implements: IViewFor
Remarks¶
This component triggers StateHasChanged when either the view model instance changes or the current view model raises PropertyChanged.
Trimming/AOT: this type avoids expression-tree-based ReactiveUI helpers (e.g. WhenAnyValue) and uses event-based observables instead.
Constructors¶
| Name | Summary |
|---|---|
| .ctor |
Properties¶
| Name | Summary |
|---|---|
| ViewModel | Gets or sets the strongly typed view model. Override this property to integrate with the platform's binding system. |
| Activated | Gets a observable which is triggered when the ViewModel is activated. |
| Deactivated | Gets a observable which is triggered when the ViewModel is deactivated. |
Methods¶
| Name | Summary |
|---|---|
| Dispose | Disposes the component and releases managed resources. |
| OnInitialized | Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree. |
| OnAfterRender | Method invoked after each time the component has rendered interactively and the UI has finished updating (for example, after elements have been added to the browser DOM). Any... |
| OnPropertyChanged | Invokes the property changed event. |
Events¶
| Name | Summary |
|---|---|
| PropertyChanged |