DEV Community

Discussion on: How I structure a React project

Collapse
 
felixdorn profile image
Félix Dorn

if e.g a Card use a CardHeader, the CardHeader should be in atoms in a Card folder or in the molecules folder

Collapse
 
maciekchmura profile image
Maciek Chmura

I don' like long import strings, so in my case, I want to have a flat folder structure.
I prefer to not do multiple nestings. So I have only one Atom folder, one Molecules ,etc.
I think that with something like this:

src/
  Molecules/
    Card/
      Atoms/                   << to much nesting for me
          CardHeader

it gets harder to navigate the project.
But please, test it and see if it works for you :)