[Blazor] Dispose page before initializing the navigated page #53535
-
You have a page that implements IDisposable and you call NavigationManager.NavigateTo("/NewPage"). The OnInitialized() event on NewPage is called before Dispose() on the previous page. Is it possible to reverse the order without forcing a reload? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @danielchalmers |
Beta Was this translation helpful? Give feedback.
-
It's not possible, we can only dispose the previous page/component when it is no longer part of the document. |
Beta Was this translation helpful? Give feedback.
It's not possible, we can only dispose the previous page/component when it is no longer part of the document.