📌  相关文章
📜  意外的令牌使用效果反应本机 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:03:05.228000             🧑  作者: Mango

代码示例1
useEffect is meant to handle any sort of "side effect" (making a change in some 
external system, logging to the console, making an HTTP request, etc...) that 
is triggered by a change in your components data or in reaction to the 
component rendering. It replaces componentDidMount, componentDidUnmount, and 
componentDidReceiveProps, or some code that is run any time your state changes.

It can be challenging to grasp the nuances of its use, but by understanding 
when it runs and how to control that, it can become a little bit easier to wrap
your head around.

https://www.leighhalliday.com/use-effect-hook