React Files & Folder Structure Overview

React Files & Folder Structure Overview

In this blog we will learn React file and folder structure, It is very important for a front-end developer to understand react file and folder structure for a better understanding of React, how react works, which file what does. So Let’s see the react files and folder:

1.node_modules folder: 
This folder contains all the modules/libraries which we use in our react project.

2.public folder: In this folder, we contain our images, favicon, manifest.json, and robots file. 

3. src folder: This folder contains the following files:

  • App.css: This file contains the css of App.js page, it is generated by default when we install react , further we can delete this file if there is no need.
  • App.js: This is main file for component where all the components we import. In this file we import our all components such as about page, header, footer other pages etc.
  • Index.css: This file contains the css of index.js page. It is default generated when we install react , further this file is not useful we delete this file.
  • Index.js: This is the main file of react which react reads first to run the project.
  • serviceWorker: This file is used to create to progressive web apps.

4.package.json: This file is important it contains all the external modules or libraries which we have used in our project such as the bootstrap module, react-router module, etc.