Wednesday, September 2, 2020

Let's explore the files in your react app

Welcome again Developers!!

In last blog we have discussed how to create react environment in your system. Now, we will explore      the files downloaded in react app.

  1. You can see the files image. See my react app name is online assignment.
  2. Inside the online assignment folder you see many folders.
  3. node_modules folder will contain all the dependency needed by the react project.
  4. public folder stores the static files like index.html, images. This folder can be access all over the project.
  5. src folder stores all the source code file we write like i have made a component like add.js, app.js etc.
  6. .gitignore stores the file/folder name need to be ignored. I hope you are aware about git and github. Whenever we push file in github we mention the file/folder name  in .gitignore which we don't want to push.
  7. package.json records our project dependencies and project configuration.
  8. package-lock-json records the exact version of package that we have installed.

NOTE: Whenever we send our project we delete node_module folder because it contain huge files and that will take time. The project receiver 
just have to type npm install in terminal to get back node_module. All the dependency get dowloaded in node_modules with the help of package.json[stores the dependency of project].



2 comments: