【React】报错:A component is `contentEditable` and contains `children` managed by React. It is now your

报错信息

  • 示例:
    在这里插入图片描述
  • 解析:
Warning: A component is `contentEditable` and contains `children` managed by React.  
It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated.  
This is probably not intentional.

警告:一个组件是`contentEditable`并且包含由React管理的`children`。
现在您的责任是确保这些节点中没有任何一个被意外修改或重复。
这可能不是故意的。

解决方法

  • 加上suppressContentEditableWarning属性
<p suppressContentEditableWarning contentEditable="true" }></p>
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
引用:在使用谷歌浏览器启动React项目时,出现了报错TypeError: Cannot read properties of undefined (reading 'forEach')。经过排查发现,问题是由于谷歌浏览器安装了React开发工具导致的。解决办法是修改依赖的js文件,具体操作是找到文件/node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js,并将其中的一行代码注释掉后重新启动项目即可解决该报错。 引用:根据提供的描述,您在项目中引入了MUI的scroll控件,并引入了mui.min.js文件,但是在使用过程中遇到了报错。很抱歉,根据提供的信息,无法准确判断您遇到的错误与React报错:Unhandled Rejection (TypeError): Cannot read properties of undefined (reading '0') 是否有关联。请提供更多的详细信息或相关代码,以便我们能够更好地帮助您解决问题。 如果您需要更多关于React报错的帮助,建议您参考一些常见的解决方法,例如检查代码中是否存在未定义的变量、查看是否正确引入相关的依赖、尝试更新React版本等。同时,您还可以参考提供的参考链接 https://www.jianshu.com/p/58c5f295141e 中的内容,以获取更多关于React报错的解决方案。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [React启动后报错TypeError: Cannot read properties of undefined (reading ‘forEach‘)](https://blog.csdn.net/qq_40600414/article/details/121736055)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [Babel7.x完美解决严格模式报错:’caller’, ‘callee’, and ‘arguments’ properties may not be ...](https://download.csdn.net/download/weixin_38684328/14043834)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

一颗不甘坠落的流星

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值