Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript React Basics (retired) First Steps in React Our First Application

Maco Acero
Maco Acero
1,200 Points

I installed the environment through Create React App and I can´t find the files you are talking about on this video.

I installed the environment through Create React App and I can´t find the files you are talking about on this video. I can´t find any jxs file. So, Have I to create? and where?

3 Answers

Alexander Alegre
Alexander Alegre
14,340 Points

Hi Maco, i do agree with Seth on being overkill but it is nice to run npm start and get it running. If you want to use create-react-app all you need to do is delete all of the files in the src folder and have one file named index.js and that will be the app.jsx that the instructor is using. After that place the css in the public directory and include it like normal. That should get it working for you after you require react and react-dom.

Hope this helps!

I did what Alexander Alegre recommended, except I kept 2 files in the src folder: index.js and index.css. All styles from app.css that were used in this project were dumped to index.css. Also, in your index.js file keep three original import statements:

     import React from 'react';
     import ReactDOM from 'react-dom';
     import './index.css';

As for public directory, all files were deleted from there, except index.html. id="root" needs to be replaced with id="container" as what the instructor uses. My index.html file looks like this now:

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Scoreboard</title>
  </head>
  <body>
    <div id="container">Loading...</div>
  </body>
</html>

Also, we don't need vendor folder anymore from the Treehouse project. HTH, Victoria

Seth Kroger
Seth Kroger
56,414 Points

Using Create React App for this course is way overkill. You should use the Workspace provided which will give you the three starter files you need. If you want to use a local editor, just launch the Workspace and copy the files into a clean directory to get started.