You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
ID: be4c4d0c-149c-bde1-c7fa-f082916390ca
Version Independent ID: 9d945996-ad02-bd4b-58ea-c465cc5cc74c
Uh oh!
There was an error while loading. Please reload this page.
[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
andOnParametersSet
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
andOnParametersSet
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 initializationand 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.
The text was updated successfully, but these errors were encountered: