4 ms·
but scoping everything to the component can be done just as easily with three separate files.
by woodrowbarlow 7y ago
but scoping everything to the component can be done just as easily with three separate files.
- Tade0 7y agoOver which you have to navigate by opening, closing, switching tabs etc. I frequently find myself overwhelmed with the sheer number of files such a convention generates. But the strengths of the single-file approach reveal themselves when you have a lot of small components - it enables you to just glance at a file and immediately know what's going on. Also it puts a psychological barier against large, bloated components.
- woodrowbarlow 7y ago> it puts a psychological barrier against large, bloated components this is the most compelling argument for me... but i still find myself having to work with overly-large components written by others. and that's when i end up doing lots and lots of scrolling and losing my place. i guess that's the difference. single-file components are superior iff you have good team rigor around component size.