DEV Community

Discussion on: You don’t always need to import React

Collapse
 
juanfrank77 profile image
Juan F Gonzalez

And so if we now start to use Hooks avoiding the use of ES6 classes can we skip importing React altogether? hehe :D

Collapse
 
dance2die profile image
Sung M. Kim

Hooks methods such as useEffect, useState, etc are from React so one would still import from 'react' 😉.

Collapse
 
juanfrank77 profile image
Juan F Gonzalez

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