I'd like to reload a Blazor page component without triggering a full browser reload.Using NavigationManager to reload works, but I'm looking for a softer approach:
- The page itself stays loaded, so singleton services keep their state.
- The component (for example, one with
@page "/entity/{id:int}/edit") should callIDisposable.Disposeif implemented. - A new instance of that component is created, so
OnInitializedAsyncruns again and all markup is rebuilt.
I think a workaround is to navigate to a "middle" page like /soft-reload?returnUrl=... and redirect back, but I wonder if there's a better way? Also, would the same technique work for non-page components?
Ideally, without involving JavaScript.