报一个警告

来源:5-9 Redux 知识点复习补充

shyqnuaa

2021-04-26

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.

写回答

1回答

Dell

2021-04-26

代码发上来看一下

0
2
Dell
回复
shyqnuaa
是的!不要写在constructor中
2021-05-01
共2条回复

React零基础入门到实战,完成企业级项目简书网站开发

主流新技术 React-redux,React-router4,贯穿基础语法

5275 学习 · 2496 问题

查看课程