And so if we now start to use Hooks avoiding the use of ES6 classes can we skip importing React altogether? hehe :D
Hooks methods such as useEffect, useState, etc are from React so one would still import from 'react' 😉.
useEffect
useState
React
Yeah I figured that right after I hit "Submit" and I was like "meeehh I'm not going to edit that now" ahaha silly me
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
And so if we now start to use Hooks avoiding the use of ES6 classes can we skip importing React altogether? hehe :D
Hooks methods such as
useEffect
,useState
, etc are fromReact
so one would still import from 'react' 😉.Yeah I figured that right after I hit "Submit" and I was like "meeehh I'm not going to edit that now" ahaha silly me