• Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    15 days ago

    as someone who only writes frontend now and then, I agree, and I don’t know how react devs find anything in their projects with the horizontal organization. I work regularly on a small one like that and it’s already a pain every time I have to backtrack where this component I’m looking at is defined.

    I have the same strong feeling about how most distros and OSes have Projects/ Documents/ Videos/ Images/ etc in the home directory: this lazy “organization” is totally useless. The first thing I do on a fresh image is to get rid of these directories.

    They’re all grouped by what they are instead of what project / domain they belong to, so finding anything is very inconvenient. My file explorer can help grouping files by type automatically, but it won’t know what is their intent.

    • BlackEco@lemmy.blackeco.com
      link
      fedilink
      arrow-up
      3
      ·
      15 days ago

      Most React devs either colocate styles with their JSX with CSS-in-JS or skip CSS entirely with Tailwind class soup in their JSX. I must be one of the few that use CSS Modules instead (so CSS is in a separate file from JSX)

  • I Cast Fist@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    14 days ago

    TLDR; don’t group files by “what they do in common” but rather the ones that “work with the same thing”. So instead of components, libraries, icons folders, group them like table1, table2, etc

  • xia@lemmy.ca
    link
    fedilink
    English
    arrow-up
    2
    ·
    11 days ago

    Fascinating. What comes to mind is frameworks that enforce horizontal separations… and the whole “convention over configuration” opine/meme.