Skip to content

Wrong documentation for OnParametersSetAsync/OnParametersSet lifecycle methods #12896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Andrzej-W opened this issue Jun 17, 2019 · 0 comments · Fixed by #15630
Closed

Wrong documentation for OnParametersSetAsync/OnParametersSet lifecycle methods #12896

Andrzej-W opened this issue Jun 17, 2019 · 0 comments · Fixed by #15630
Assignees
Labels
Blazor doc-enhancement Pri1 Source - Docs.ms Docs Customer feedback via GitHub Issue

Comments

@Andrzej-W
Copy link

Andrzej-W commented Jun 17, 2019

[EDIT by guardrex to remind myself to add the no-loc metadata: no-loc: [Blazor]]

In current doc here https://docs.microsoft.com/en-us/aspnet/core/blazor/components?view=aspnetcore-3.0#lifecycle-methods we have:

OnParametersSetAsync and OnParametersSet are called when a component has received parameters from its parent and the values are assigned to properties. These methods are executed after component initialization and each time the component is rendered:

It should be something similar to this:

OnParametersSetAsync and OnParametersSet are called when a component has received parameters from its parent and the values are assigned to properties. This happens each time parent component is rendered. These methods are executed after component initialization and each time the component is rendered:

The problem was discovered here: dotnet/aspnetcore#11248
In my opinion Blazor works as expected but not as documented. OnParametersSet methods are not called when component is rendered as a result of handling some event. They are called only when parent component is rendered. Those conclusions are based on experiments. I have not analysed source code.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blazor doc-enhancement Pri1 Source - Docs.ms Docs Customer feedback via GitHub Issue
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants