[Bug]: Excessive Requests for Page Data - Why Does This Happen?
未关闭
还没有人认领这个 Issue。
bug: unconfirmed
- 主要语言
- JavaScript
- 星标
- 11.8k
- 派生
- 7.9k
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 11
描述
Summary
When I hover over a menu element, it triggers a request to fetch the page data. However, each subsequent hover initiates the request again. I believe this is unnecessary. There should be a system in place to check if the client already has the data, right? I'm not sure if this issue pertains to React or the page setup.
https://github.com/reactjs/react.dev/assets/42542864/53e85173-57c7-4d26-849b-fdab39712d15
Page
Details
No response
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,在 https://react.dev 上将鼠标悬停在菜单元素上,复现重复的 page-data 请求,并使用浏览器的网络面板比较连续的悬停操作。跟踪站点代码中的请求入口点,确定是否正在复用现有的客户端数据;完成标准是重复悬停不再发出不必要的请求,同时不影响页面导航。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, react
- 领域
- frontend, web-dev
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100