-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Support rendering components outside of the HttpContext #38114
Copy link
Copy link
Closed
Labels
Priority:1Work that is critical for the release, but we could probably ship withoutWork that is critical for the release, but we could probably ship withoutarea-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-prerenderingIssues related to prerendering blazor componentsIssues related to prerendering blazor components
Milestone
Metadata
Metadata
Assignees
Labels
Priority:1Work that is critical for the release, but we could probably ship withoutWork that is critical for the release, but we could probably ship withoutarea-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-prerenderingIssues related to prerendering blazor componentsIssues related to prerendering blazor components
Type
Fields
Give feedbackNo fields configured for issues without a type.
There has been a historical ask to be able to render UI using Razor without being in the context of a web application. Many of these requests are based on things like generating HTML fragments for sending emails or even generating content for sites statically.
In the past, we've relied on "tricks/hacks" to the Razor View Engine to guide customers on how to accomplish this. However all those "hacks" are very involved and require a lot of setup. Components offer an opportunity to do this with much upfront cost for us and our customers, since they don't have any dependency on the request primitives like the Razor View Engine does.
Being able to have this support also helps with the idea of being able to render root components from ASP.NET Core in the same way we do Razor pages/views and offers several advantages for prerendering scenarios (like dealing with meta/title/etc without hacks) and a path forward for a lighter way of authoring UIs within ASP.NET Core applications.