Skip to content
Advertisement

What is App.js file in React? The file is way too long?

I wanted to mention that I am new to react and took over the existing project. The app.js file in the component folder is too long. Does this file update by itself, or is it ok to edit the file?

Advertisement

Answer

This is the main file in reactJs. It is the parent component of the application. All the components of the application are included in app.js.

No, this file does not get updated automatically, you as a developer have to manually update it.

If you want to edit this file then it’s ok but as it will help you in exploring the application. Suppose you remove a component then after running you encountered an error, with this you learn how to resolve the errors. And if you want to add new components then you must implement in app.js so that it can be rendered and you can visualize it

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement