DEV Community

Discussion on: Why to use useState in react?

Collapse
 
aasthapandey profile image
Aastha Pandey

I think when we use function component, we use the hook useState() and when we are using class component we use this.state.
I've never used class component or this.state.