How to pass arguments from the setState updater to the setState callback

前端 未结 0 520
失恋的感觉
失恋的感觉 2021-01-30 12:45

I want to do something like this

this.setState(prevState => {
  //some logic
  let bar = foo();
  return {stateElem};
},         


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