From where do we import 'react' to work with React realted methods?
Good day) Actually we import ‘react’ from somewhere. Where do we import ‘react’ from?

You are importing react from the folder you just created from the cli install

“create-react-app (the name of your project)”

Node Package Manager installs react in the project folder you created. You will find react in the “node_modules” folder.

so when you put import react from ‘react’, your computer sources react from that “node_modules” folder.

I hope I explained this correctly.

1 Like