In React, calling state twice, but second one always one step behind?

后端 未结 0 1370
小鲜肉
小鲜肉 2020-12-07 18:16

In React, onButtonClick method updates state on currentIndex properly, but not on the currentText. If you check out the two console logs, you\'ll see that currentText lags b

相关标签:
回答
  • 消灭零回复
提交回复
热议问题