From where do we import 'react' to work with React realted methods?

https://www.codecademy.com/paths/web-development/tracks/front-end-applications-with-react/modules/react-101-react-components-u/lessons/your-first-react-component/exercises/import-react
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