【发布时间】:2017-06-19 23:00:23
【问题描述】:
我正在尝试在无状态反应组件中实现一个可内容编辑的 div。
我不断收到以下警告:
warning.js:36 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.
我该如何解决这个问题?
另外,我如何在更改时读取 div 的内容?
【问题讨论】:
标签: javascript reactjs contenteditable