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 Router 4 Basics Getting Started with React Router Introducing the Project

Will Albertsen
Will Albertsen
13,155 Points

Src folder generated with create-react-app

When I create a new project with create-react-app there is a src folder that comes with it. The files are different that the files in the src folder from the project files. Can I just get rid of the src folder automatically generated with create-react-app or are there important files there that I should hold on to. If so, how can I distinguish between the two src folders?

Dom Ss
Dom Ss
4,339 Points

Hey Will,

late answer to your question and you probably figured it out already, but I will post the answer for future students to see.

When you create your own project with create-react-app, you can delete the src files that came with the tool. Copy the src from the Guils project files along with package.json which includes dependencies. After that run "npm i" again to make sure you've got the right dependencies.

To be honest, for the sake of this tutorial it would be easier to download the files, run "npm i", and then "git init" (if you want to push that project to git) and then you are all set.

create-react-app might be troublesome as some of the files like app.js might be in the different directory compared to Guil's project.

1 Answer

Ian Ostrom
seal-mask
.a{fill-rule:evenodd;}techdegree
Ian Ostrom
Full Stack JavaScript Techdegree Student 10,331 Points

As Will said, replacing the replacing the entirety of the src folder with Guil's src folder is fine. I haven't had any issue doing that for the past few course in the FSJS techdegree. I don't copy over the package.json file as Guil's refers to older versions of those dependencies set up by create-react-app.