-通过 / -执行
Implement useUpdateEffect() that it works the same as useEffect() except that it skips running the callback on first render.
useUpdateEffect()
useEffect()
普通解法但是bugfree胜于奇技淫巧但是各种bug。
Try it out
Console