[Blazor] Nested Components with inner partial classes (not child components) #20765
Labels
affected-medium
This issue impacts approximately half of our customers
area-blazor
Includes: Blazor, Razor Components
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
feature-blazor-component-model
Any feature that affects the component model for Blazor (Parameters, Rendering, Lifecycle, etc)
feature-razor.language
✔️ Resolution: Duplicate
Resolved as a duplicate of another issue
Pillar: Dev Experience
Priority:2
Work that is important, but not critical for the release
severity-minor
This label is used by an internal tool
Status: Resolved
Milestone
The Idea
In C# we can use inner or nested classes for example:
More information about nested classes can be found here.
However it would be nice to see the same approach in Blazor for components, which can make the usage much cleaner and clearer, an example component (mind the
.
betweenMenu
andItem
orMenu
andSubMenu
)The current workaround is to have the components fully named and there is no way (or at least that I'm aware of) to nest components like this(like nested classes), Which makes the code a bit less clear especially if you have multiple components with the
SubMenu
orItem
name.Describe the solution you'd like
Make it possible to create inner (nested) components just like we can do with normal nested classes.
The text was updated successfully, but these errors were encountered: