Paine8887
Paine8887

Reputation: 33

My React App wasn't displaying the components I created and I figured out why

So I Started a new project that displays my skills in React. To begin I started by creating a new file called project13. Secondly I created all of my html,css, and JavaScript files that I would need. to top it off I created all of my component files and even rendered my parent component to a div in my html file.At this point I feel satisfied that I have enough coding done to see this on a development server. I run the code down below in the terminal and press npm start to see a development server on localhost:3000 that looks like nothing I have created.

npx create-react-app project13
cd project13
npm start

Screenshot of port 3000

I was so confused until I started doing research on creating a react app globally. I didn't realized that creating a react app had a build system that does most of tedious work for developers; it does this by creating the file, html, css, and having an src file you can add your components in. My mistake was firstly by creating a file, secondly creating my components, then lastly creating my react app. I will post down below what steps I took that lead to this problem with what steps I should taken instead down below. I hope this clears up some confusion earlier.

Failed process:

  1. Creating a project13 folder
  2. creating my html, css, JavaScript files.
  3. creating all of my components.
  4. npx create-react-app project13
  5. cd project13
  6. npm start

    Successful process:

  7. npx create-react-app project13

  8. cd project13

  9. npm start

  10. Start editing and creating my components in the src file.

Upvotes: 0

Views: 200

Answers (1)

John Behan
John Behan

Reputation: 584

This is the default create-react-app page after you run the commands above

What makes you think it's the wrong project? What do you expect to see?

Upvotes: 1

Related Questions