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
@scalablecory You are trying to perform JS interop during OnInitializedAsync which is not supported and might not work well in all scenarios. The right place to do JS interop (where is safe to do so) is inside OnAfterRenderAsync
What is happening is that during prerendering the JS runtime is not initialized, so you get an error when you try to prerender the Counter page. It doesn't happen when you are launching the app because you are prerendering the Index page, but when you go to the counter page and press F5 it tries to prerender the Counter page and fails at that point.
From @azbo on Wednesday, September 18, 2019 6:31:28 AM
Issue Title
blazor localStorage F5 Refresh “Object reference not set to an instance of an object.”
General
visual studio version:

sdk version:.net core sdk 3.0 rc1
localStorage get set js:

Index.razor set localStorage:

Counter.razor get localStorage:

Reiteration steps:
step1:
step2:

step3:

F5 Refresh or
step4 except:

Copied from original issue: dotnet/core#3394
The text was updated successfully, but these errors were encountered: