JavaScript React Components Build Modular Interfaces with Components Setting up with Create React App

AF Content
AF Content
21,182 Points

Why can't I view React app in browser?

I set it up exactly as the video is telling me to, but for some reason when my app runs in the browser I see the React logo and then a message underneath that says "Edit src/App.js and save to reload." Instead of actually seeing the app in the browser.

Did I do something wrong or miss a step? I've rewatched the video a thousand times and can't seem to figure out what the problem is.

Dane Parchment
Dane Parchment
Treehouse Moderator 9,682 Points

Can I see your code? It's possible you are editing the wrong file, and so you aren't seeing the results change.

William Wei Luan Ting
William Wei Luan Ting
2,688 Points

I seem to remember having a similar issue when I started with React. I can't seem to remember the exact solution I did for this. If you post your code it will help. But here are my exact steps I use to setup a react environment from scratch.

Install Node.js Install VisualStudio Code from vs code's terminal install react by tying ins "npm install -g create-react-app" from any directory you can then type in "create-react-app my-app" a folder named my-app will be created, navigate to this directory and then type in "npm start"

if you do all the steps above it should work.