Finding is better than folding
I was reading this thread on Reddit about how to structure your React files. In the past I would have said something like:
and used an
index.js in every folder for the root React component. These days I’m much more inclined to do:
because I find both deeply nested folders and files with the same name annoying. I also think it’s ideal if you can quickly move through files with linked structures (F12 in VS Code if you’re using Typescript) or search for files using the Command Palette rather than trying to guess from
/ down where a file might be.
Posted: January 2021