1
I’m starting to learn React Js and I’m intending to create a website on it, but I was left with a question.
The React Js is the component base, right?
I have the App.js where I call my own components and it will show on the screen.
Let’s say I want to start doing Index of my website.
Inside the folder src I create a folder called componentes.
Inside the folder componentes, crybaby umarquivo.js and umarquivo.css respectively to put the css of the arquivo.js
Thinking about creating components, I won’t do the same as I do a normal page with bootstrap just by creating index.php.
I would have to make the components, isn’t it?
Example:
briefcase: src/componentes/header.js
briefcase: src/componentes/header.css
In the header.js I would create the header of my website, and header.css I would create the css of my header, right?
My question would be this... how do I organize the components?
For each "página" I would create a briefcase inside src/componentes/index
And in that index folder, I would create the componentes of the same?
Suppose I then want to create the page "contato", I would create src/componentes/contato
And inside the contact folder, the components .js and .css?
Because I think if I don’t sort by folders, the files will get confused when the site is finished, thinking, of course, that the site would be great.
Going deeper into the question, my question is: How to structure the pastas and the archives .js and .css to be organized and easy to find, mainly for maintenance?