Trigger enhanced page nav on hot reload#35450
Merged
mkArtakMSFT merged 1 commit intorelease/8.0.1xxfrom Sep 18, 2023
Merged
Conversation
ba8ef62 to
59d8b34
Compare
| // Blazor SSR. | ||
| if (window.Blazor?._internal?.hotReloadApplied) | ||
| { | ||
| Blazor._internal.hotReloadApplied(); |
Member
There was a problem hiding this comment.
From reading Boot.Web.ts in dotnet/aspnetcore, hotReloadApplied is defined as:
Blazor._internal.hotReloadApplied = () => {
if (hasProgrammaticEnhancedNavigationHandler()) {
performProgrammaticEnhancedNavigation(location.href, true);
}
};It looks like that will do nothing if options.ssr.disableDomPreservation is set to true. Do we also need something else to make hot reload work in that case? For example we could add an else block that forces a full-page load.
I appreciate you can't do that in this PR since that's in a different repo. Just check if that's something we need to follow up on today!
Contributor
Author
There was a problem hiding this comment.
Opened dotnet/aspnetcore#50790 to follow up.
SteveSandersonMS
approved these changes
Sep 18, 2023
Member
SteveSandersonMS
left a comment
There was a problem hiding this comment.
Looks good! Added a comment about one thing that might need followup but I'm unsure since maybe it's being handled some other way.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Depends on dotnet/aspnetcore#50437.
Addresses dotnet/aspnetcore#49144.