DEV Community

Cover image for Don't Stress: REACTJS (Folder Structure)
Orion F.
Orion F.

Posted on

3

Don't Stress: REACTJS (Folder Structure)

Alt Text

Folder Structure

Hi readers,

In this post, I wanted to give insight about the folder structure of a ReactJs App. I wanted to create separate post the so you can get insight in a gradual way. Again, I try not to be lengthy on the steps, but get right to the info. Hope you enjoy!

Folder Structure Breakdown

  • package.json: Includes the dependencies and the scripts used to create a project.

  • package-lock.json: Ensure the installation of the dependencies.

  • .gitignore & readme: Don't worry about these files.

  • node_modules: All the dependencies are installed in the folder. It's generated when you run the "create-react-app" command.

  • public folder

    • manifest.json: Used for Progressive Web Apps (PWA's)
    • favicon.ico: Nothing specific, just the icon for the title.
    • index.html:Typically you won't change anything in the body. Maybe the head tag but that's all. This contains the root DOM node.
  • src folder: The folder you will work with the most for the development.

    • index.js: specify the 'root' element which is controlled by React.
    • app.js: Responsible for showing the UI (view) within the browser.
    • app.css: Used for styling the app UI.
    • app.test.js: Used for testing
    • index.css: applies styling to the body tag.
    • logo.svg: refrenced in the app component.
    • serviceWorker: used for PWA's only.

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay