Using previous state from React's state updater function on objects and arrays

前端 未结 0 1828
北恋
北恋 2021-01-07 09:03

React passes state-setting functions a callback with an argument that contains the previous state, so I know you should probably use the previous state when updating a state

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