Trying to make an API call before using setInterval() in useEffect() hook in React

前端 未结 0 634
情书的邮戳
情书的邮戳 2021-02-12 11:57

I\'m using a useEffect() hook in React to fetch data on an interval every five seconds. When my app first loads, the initial fetch request takes five seconds becaus

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