Conversation
Yeah, that sounds good to me. That scenario was already pretty obscure, so it would probably just create confusion by leaving it in there.
Interactive root component instances can be preserved between enhanced navigations under certain conditions:
If these conditions are not met, then an interactive component will get disposed when an enhanced navigation occurs. The customer in the linked issue was experiencing their interactive page component losing state (getting disposed and re-initialized) because their component read from route parameters. Since the component's parameters changed between enhanced navigations, the interactive component instance got disposed and a new one got initialized in its place. The workaround I suggested to them was to not mark the page as interactive, but define a separate interactive component rendered by a static page, and specify a constant
I don't think we need to add anything specific for the customer's scenario. If we start getting feedback that there's a common need to be able to preserve a page component instance as its route parameters change, we can document it. |
Very well. At least now, we have your remarks here and on their issue. If we need to cover this later, it will be easy to address. |
Fixes #31117
Addresses #28161
Mackinnon ...
OnAfterRender/firstRenderdoes not execute a second time when the SubPage button is clicked.Three questions ...
Internal previews