-通过 / -执行
Create a hook usePrevious() to return the previous value, with initial previous value of undefined.
usePrevious()
undefined
普通解法但是bugfree胜于奇技淫巧但是各种bug。
Try it out
Console