+ 1
Error. Showing useState is not defined in React Event handling
When I'm running the code here in sololearn IDE with added libraries, it's showing an error such as useState is not defined. https://code.sololearn.com/Wsnyuri2ayoc/?ref=app
2 odpowiedzi
+ 1
It you don't want use React.useState everytime you define a state. You can use
destructuring.
const { useState } = React
+ 1
It's React.useSate