<DynamicComponent Type="@componentType" Parameters="@parameters" /> @code { private Type componentType = ...; private IDictionary<string, object> parameters = ...; }
<DynamicComponent Type="@typeof({COMPONENT})" @ref="dc" /> <button @onclick="Refresh">Refresh</button> @code { private DynamicComponent? dc; private Task Refresh() { return (dc?.Instance as IRefreshable)?.Refresh(); } }
References
https://learn.microsoft.com/en-us/aspnet/core/blazor/components/dynamiccomponent?view=aspnetcore-7.0