React stale state in useEffect when using empty dependency array

前端 未结 0 635
栀梦
栀梦 2021-01-15 17:31

I\'m trying to read state after it\'s modified within useEffect hook. However since useEffect closes over availability being empty array, it\'s not updated at all causing in

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