Open timdinh opened 1 year ago
It's not really clear what you mean by parent/child page, this is not a generally understood concept in blazor, can you please provide a minimal repro of what you mean? Is this related to SSR pages or SPA type applications?
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
Here's a diagram that should help explain.
iOS navigation is doing something similar, it just has a stack and it place child view on top and remove the last view when user navigate back.
@timdinh
If you're using .Net 7.0 or earlier, check out Jeremy Likness' blog post Blazor State Management
If .Net 8.0 (Preview), Dan Roth has an excellent sample project on Github: BestForYouRecipes
Hopefully these help.
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
In blazor, I have a parent and a child page, when we go back to parent from the child, the parent page get reconstruct and we lose the scroll position and there is a performance penalty for reconstructing the page.
Describe the solution you'd like
My proposal is that when navigating to the child view, it should be placed on top of the parent view like a stack. When we navigate back, all we have to do is remove the child view. This way, there is no performance penalty due to having parent page reconstruct again and we don't lose scrolling position.
Disadvantage would be if the app has very deep navigation stack then it would use more memory. However, most app don't have very deep navigation. Also, the developer would have a choice of weather they want to use current Navigation or the new StackNavigation
Additional context
No response