#Folder structure help.

8 messages · Page 1 of 1 (latest)

severe blaze
#

Hi All! Would anyone be able to help me understand the project folder structure created with Vite (React)? Specifically, why are there index.css and app.css? Both .css extensions? And what is the difference between main.js and index.jsx, both seem to target the root id from the index.html. Any learning sources would be appreciated. In the images attached I have a folder structure from Bob Ziroll's react course in Scrimba, the other one is created with Vite (React).

jagged python
#

index.css is for styling main.jsx and App.css is for styling App.jsx
And there is no such major difference between index.js file in Bob Ziroll's screenshot and main.jsx in the Vite project. Just different names.

azure sluice
azure sluice
#

Do we need to have to config something or just use the create vite command and we r good to go?

jagged python
severe blaze
azure sluice
#

That's based on ur comfort,

If u have a Component like search feature,
U create search feature folder(optional), in that

Search.jsx
search.css
Link those those

with the above thing, u can search up for css errors or something easily.

Else,

U can also go for search.jsx, laughing.jsx, playing.jsx,... and a combined 1 css file for those.