-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Open
Labels
Pillar: Complete Blazor Webarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-full-stack-web-uiFull stack web UI with BlazorFull stack web UI with Blazor
Milestone
Description
This is to follow up on #47023 (comment) and #47023 (comment)
Currently, you have to construct a RazorComponentResult manually, e.g.:
// Minimal
endpoints.Map("/mypage", () => new RazorComponentResult<MyPageComponent>());
// MVC
public IResult MyPage()
=> new RazorComponentResult<MyPageComponent>(new { Greeting = "Hmm" });
For consistency with other built-in result types, we probably also want helpers so you can do things like:
// Minimal
endpoints.Map("/mypage", () => Results.RazorComponent<MyPageComponent>());
// MVC
public IResult MyPage()
=> RazorComponent<MyPageComponent>(new { Greeting = "Hmm" });
boukenka and tharlab
Metadata
Metadata
Assignees
Labels
Pillar: Complete Blazor Webarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-full-stack-web-uiFull stack web UI with BlazorFull stack web UI with Blazor