-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components
Description
Describe the bug
With a page which has a 'main' component in it, referencing sub-components, the main-components onAfterRender is called before the sub-components onAfterRender.
Deliberately not using the async versions.
Expected behavior
I expected the sub-components onAfterRender to run before the the main-component's onAfterRender. I wanted the sub-components to report back before the main-component, like Angular's ngAfterViewInit does it.
To Reproduce
Steps to reproduce the behavior:
- Using the latest .NET Core 3 preview with Latest VS 2019 Preview.
- Start a new Blazor client-side project
- Create a main-component which overrides the onAfterRender and writes a line to the console.
- Create a sub-component which overrides the onAfterRender and writes a line to the console.
- Create a page which has a main-component which holds a couple of sub-components inside of it.
- The main-component's onAfterRender will run before the sub-component's same.
ComponentPage.razor.txt
SubComponent.razor.txt
MainComponent.razor.txt
Metadata
Metadata
Assignees
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components
