Set function on useState not working on first use

后端 未结 0 1716
长发绾君心
长发绾君心 2021-01-13 01:48

I have a function which is intended to call an API for some data, and then set the data object equal to a value in state so it can be used elsewhere in my app. My example is

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