-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Description
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.
- [Feature request] support to use blazor razor as template engine to render report and save the raw string #30717
- [Blazor|Mvc] Make Microsoft.AspNetCore.Mvc.ViewFeatures.IComponentRenderer public #21666
- Blazor: Preview9 made HtmlRenderer & ComponentRenderedText internal #13687
- [Components] Enable a root component to be the entry point for component based apps #7528