- accepted / - tried
Create a hook usePrevious() to return the previous value, with initial previous value of undefined.
usePrevious()
undefined
バッグフリーで普通なコードは何より。
Try it out
Console