How to make a custom hook respond to changes in state?

后端 未结 0 1581
生来不讨喜
生来不讨喜 2021-02-03 11:38

I have a custom hook that processes a certain state variable.

Whenever you change the state It does not update immediately so I have to subscribe to it using useEffect.

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