DEV Community

king517
king517

Posted on

Import from 'react'?

I am new to react and this may sound wierd. I have read about Es6 modules.

i am confused by this line of code:

** import React from 'react'. **

I am aware that you can import methods,classes etc from files using 'A PATH' e.g ('./file,js')!

BUT I DON'T UNDERSTAND :
** import React from 'react'. **

where is the react in quotes comming from? i can't see any file or so.

Top comments (1)

Collapse
 
razsbg profile image
Răzvan Sbîngu

Hi there. The 'react' represents the React package that is present in the node-modules folder.