Renderer.CreateComponentState(Int32, IComponent, ComponentState) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a ComponentState instance to track state associated with a newly-instantiated component. This is called before the component is initialized and tracked within the Renderer. Subclasses may override this method to use their own subclasses of ComponentState.
protected virtual Microsoft.AspNetCore.Components.Rendering.ComponentState CreateComponentState (int componentId, Microsoft.AspNetCore.Components.IComponent component, Microsoft.AspNetCore.Components.Rendering.ComponentState? parentComponentState);
abstract member CreateComponentState : int * Microsoft.AspNetCore.Components.IComponent * Microsoft.AspNetCore.Components.Rendering.ComponentState -> Microsoft.AspNetCore.Components.Rendering.ComponentState
override this.CreateComponentState : int * Microsoft.AspNetCore.Components.IComponent * Microsoft.AspNetCore.Components.Rendering.ComponentState -> Microsoft.AspNetCore.Components.Rendering.ComponentState
Protected Overridable Function CreateComponentState (componentId As Integer, component As IComponent, parentComponentState As ComponentState) As ComponentState
Parameters
- componentId
- Int32
The ID of the newly-created component.
- component
- IComponent
The component instance.
- parentComponentState
- ComponentState
The ComponentState associated with the parent component, or null if this is a root component.
Returns
A ComponentState for the new component.