Question:How to decrease timer value in
localstorageby one? I used the useLocalStorage hook, but the value does not dynamically decrease by one. Thank you!
use-local-storagehook you referred to does not support the
setState(previousValue => nextValue)syntax.
The easiest way to fix this is to use a different implementation, e.g. this one: use-local-storage, used in gerrod ‘s comment
If you have better answer, please add a comment about this, thank you!