You aren't calling setState
at all in your code by the looks of it, you are setting it(从外观setState
,您根本没有在代码中调用 setState
,而是对其进行设置)
this.setState = ({ ... })
This line assigns the value of setState
which is all wrong, setState
is a function that you need to invoke to update the state ie(该行分配的setState
值是错误的, setState
是您需要调用以更新状态的函数 ,即)
this.setState({
...
})
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…