Skip to content

启用Blazor增强导航 #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
huhubun opened this issue Apr 20, 2025 · 0 comments
Open

启用Blazor增强导航 #44

huhubun opened this issue Apr 20, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@huhubun
Copy link
Owner

huhubun commented Apr 20, 2025

刚开始开发时,注意到 Blazor Web App 即使引入了 PersistentComponentState 保持组件状态,在首次访问页面时,仍然会先触发一次服务器端渲染,然后触发一遍客户端渲染,会访问两次数据库。

可以搜索到类似问题的反馈:dotnet/aspnetcore#59198

于是,当时采用的方案是,禁用增强导航,每次访问都从服务器端渲染,然后切换为 Web Assembly。

根据用户体验和反馈,考虑到问题的影响(首次渲染页面时,分别从服务器端和API端访问数据库两次),处在可接受的范围内,现在准备启用Blazor增强导航,以提升页面的响应速度和浏览体验(可以大幅提高切换页面时的响应速度和卡顿)。

@huhubun huhubun added the enhancement New feature or request label Apr 20, 2025
@huhubun huhubun added this to the 0.1.1-alpha.6 milestone Apr 20, 2025
@huhubun huhubun self-assigned this Apr 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant