Why does using Async/await in setState React work?

后端 未结 0 1781
有刺的猬
有刺的猬 2021-01-20 23:01

Using await inside a async makes change of state working in console.log. If i remove the await line then console.log fail because is needed callback of setState.

         


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