Can I use blazor component tags in razor pages?

Viewed 135

I know I can render blazor component anywhere inside razor page using

Html.RenderComponentAsync() or <component type="typeof(Client.App)" render-mode="Static">

What I would like to achieve is being able to use regular blazor tag components with their ability to nest them with RenderFragment, for example:

<OutsideComponent>
        <InsideComponent>
                <div>Some content</div>
        </InsideComponent>
</OutsideComponent>

At the same time I would like to keep all razor page functions like OnGet(), OnPost() handles.

Is that at all possible to merge those two approaches? I use render-mode="Static" and don't care about blazor interactivity, I just want my code separated to nestable components.

0 Answers
Related