DEV Community

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

jenessawhite profile image
Jenessa White • Edited on

Wondering, if this can help clear up some 'unused variable warnings' even if I am using { useEffect } i don't need to also import react, right?

dance2die profile image
Sung M. Kim Author • Edited on

You're welcome, Jenessa.

Yes. You can.

Just check if the module isn't using JSX or other React.* methods such as "React.useEffect" (due to "unused variable warnings")