I'm a junior frontend developer and I'm a little bit confusing about the difference between
- 'prev'
- 'prevstate'
- 'prevState'
in useState hooks. I found them maybe all the same referencing to the state before, and I create a counter example for testing it out.
codesandbox: https://codesandbox.io/s/react-counter-8snzou?file=/src/App.js
Can somebody give me an explanation of the difference or if there's no difference, why would there be three kinds of prevState?
I expecting someone could give me a good explanation of prevState in useState hooks. Thank you for any help you can provide.