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