简体   繁体   English

移动设备上的 React MUI 自定义选择组件抛出错误

[英]React MUI custom select component on mobile throws error

Codesandbox link from mui doc来自 mui doc的 Codesandbox 链接

https://codesandbox.io/s/izm2c2?file=/demo.js inspect and try different dimension (phone, ipad or anything) by opening in new window. https://codesandbox.io/s/izm2c2?file=/demo.js通过在新窗口中打开来检查并尝试不同的维度(手机、ipad 或任何东西)。

I can't find way to resolve this error.我找不到解决此错误的方法。

Error
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.

Thanks in advance!提前致谢!

The the problem seems to be with react 18>.问题似乎出在反应 18> 上。 Try downgrading to react 17< thats what fixed the issue for me.尝试降级以做出反应 17< 这就是为我解决问题的原因。

You should post the issue on github as well您也应该在 github 上发布问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM