So with a release of asp.net core 3.0 and blazor 1.0 I started doing some actual work with blazor. When splitting Blazor component code into code behind I am using the following
public class LogoutModel : BlazorComponent{}Unfortunately BlazorComponent does not exist anymore, so I move to ComponentBase. Not sure when did this change took place..
Now the rest of my code looks like this
public class LogoutModel : ComponentBase{ protected override async Task OnInitializedAsync() { } protected override async Task OnParametersSetAsync() { }}What i notice is that life cycle methods are executed in the following order
OnInitializedAsync()OnParametersSetAsync()OnInitializedAsync()OnParametersSetAsync()
I am not really sure why is each method executed twice.
This is what my Blazor file looks like
@page "/account/logout"@inherits LogoutModel<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width" /><title></title></head><body> Logout page</body></html>