Make Blazor More Extensible #55853
Labels
area-blazor
Includes: Blazor, Razor Components
design-proposal
This issue represents a design proposal for a different issue, linked in the description
✔️ Resolution: Answered
Resolved because the question asked by the original author has been answered.
question
Status: Resolved
Summary
Many built-in components and services for Blazor are
internal
or are marked aspublic sealed
, which is frustrating when trying to extend Blazor. For example, whileRouter
is public,RouteData
is sealed and cannot be extended. Similarly, bothSectionOutlet
andSectionContent
are sealed.There are many more if you search
public sealed
in thecomponents
folder.I would like to propose:
We love Blazor and want to help continue pushing it forward.
Motivation and goals
SectionOutlet
to add more functionality, it must now be composed in a new component.AuthorizeRouteView
as it is sealed. Instead, we have to either copy the existing code into our class or somehow compose it in another layer.public sealed
orinternal
, we end up "stubbing our toe" on things that shouldn't be that complicated. Lots of annoying quirks around Routing and<HeadContent>
or the<PageTitle>
.In scope
Out of scope
Wishlist: Open up the Router for better extensibility, and consider implementing a v2 router with less ties to Shared resources in other packages. (probably a separate issue, but related to extensibility)
Risks / unknowns
Examples
Give brief examples of possible developer experiences (e.g., code they would write).
Crazy sample (psuedocode-ish) to demonstrate:
The text was updated successfully, but these errors were encountered: