Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Maximum update depth exceeded.

未关闭
#265 2 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
react, typescript
领域
frontend

调研方向

首先在关闭开发者工具的情况下,通过 antd Select 和 react-component/select 路径复现该错误。然后跟踪 stack 中报告的 updateMiniStore 和 componentDidUpdate 条目,并验证打开下拉菜单并选择多个项目后不再产生最大更新深度错误。

由索引模型根据 Issue 内容生成。

描述

We are occasionally experiencing the following error in our production environment. Only certain users are experiencing this. We are using an antd select component, which uses the react-component/select component, which uses this component. Sometimes this error occurs when first clicking in the select dropdown, and other times, when selecting the 3rd/4th item in the dropdown.

Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

  at listener (client.3713b3bd.js:3614)
vendor.17bd68bdeb41bf6a11e3.js:2573 Invariant Violation: Minified React error #185; visit https://reactjs.org/docs/error-decoder.html?invariant=185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings. 
    at https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:522
    at a (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:625)
    at Qa (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:95354)
    at Object.enqueueSetState (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:44845)
    at l.x.setState (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2612:1702)
    at Array.r.handleChange (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:1006:710657)
    at Object.setState (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:1006:713027)
    at t.updateMiniStore (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2557:83699)
    at t.componentDidUpdate (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2557:83601)
    at Ba (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:82584)
    at Va (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:85160)
    at https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:98367
    at Object.t.unstable_runWithPriority (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2628:3194)
    at js (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:98302)
    at Cs (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:98078)
    at Es (https://integrate.bmwgroup.net/vendor.17bd68bdeb41bf6a11e3.js:2573:97423)

One other piece of information, whenever we open the developer tools, this bug does not happen, when we close it, it starts happening again.

主要语言
TypeScript
星标
701
派生
266
平均合并
1 天 2 小时
30 天内合并 PR
2

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

react-component/menu 的其他 Issue

查看 react-component/menu 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。