有一个警告Can't call setState on a component that is not yet mounted
来源:6-1 UI组件和容器组件
慕虎6468404
2022-08-10
写的代码和老师一样,但是第一次输入后,点击按钮,会有一个警报‘react_devtools_backend.js:4026 Warning: Can’t call setState on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to this.state
directly or define a state = {};
class property with the desired state in the TodoList component.’
但是我并没有在初始化的时候用setstate方法啊
写回答
1回答
-
Dell
2022-08-13
把组件代码发上来一起看一下
00
相似问题