[release/8.0-preview7] [Blazor] Improvements to the interaction between SSR and interactive rendering #49557
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improvements to the interaction between SSR and interactive rendering
This PR improves how Blazor's new SSR feature blends with interactive component rendering.
Description
Before this PR, full-stack Blazor had multiple limitations when using server-side rendering (SSR) and interactive rendering (Blazor Server/WebAssembly components) in combination:
Note: From now on, I'm going to refer to updates to static content that don't involve a page reload as "SSR updates". This includes enhanced navigations and stream rendering updates.
This PR enhances the experience by:
In summary, these changes make the boundary between SSR and interactive rendering much more seamless than it was before.
Fixes #48763
Fixes #48764
Customer Impact
Medium/high. Many of the issues we've run into when doing internal app building are due to the aforementioned limitations. This is a change we're anticipating will greatly increase the capabilities of apps customers can build, so it's critical we get feedback about whether the behavior of this feature meets their needs.
Regression?
Risk
This is a large change that touches some fairly fundamental parts of the framework. Existing automated tests help give us reasonable confidence that existing Blazor WebAssembly and Server applications (non-SSR'd) won't be affected by this change. However, the possibility of behavioral changes in certain edge cases is non-zero.
New automated tests validate the functionality of the enhancements this PR brings.
Verification
Packaging changes reviewed?