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:

components/
	layout/
		component_name
	data/
		component_name
	other_domain/
		component_name
	...

and used an index.js in every folder for the root React component. These days I’m much more inclined to do:

components/
	component_name

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.