+ 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

20th Jul 2020, 1:58 PM
Dhrubajyoti Mandal
Dhrubajyoti Mandal - avatar
2 Respuestas
+ 1
It you don't want use React.useState everytime you define a state. You can use destructuring. const { useState } = React
20th Jul 2020, 4:31 PM
🇮🇳Vivek🇮🇳
🇮🇳Vivek🇮🇳 - avatar
+ 1
It's React.useSate
20th Jul 2020, 2:09 PM
Calviղ
Calviղ - avatar