3 ms·
"There's only one component per file" If you don't do this in React, its your own fault.
by strangescript 2y ago
"There's only one component per file"
If you don't do this in React, its your own fault.
- morcus 2y agoI also don't really see why this is a positive. If you have too much in a file, then split it off? It doesn't fundamentally add or subtract and complexity either way.
- myko 2y agoI think Svelte likely has a lot of benefits over React but I feel like this is a negative. It's easier for locally of code to keep related components together, and they can always be put into their own files later.
- snide 2y agoWell. I think that's sort of what I like about Svelte. There's a lot less opportunity to make bad decisions.
- vermilingua 2y agoUnfortunately some of us work with other people, and refusing to let them merge code we don't personally agree 100% with is a great way to stop working with other people :)
- Toritori12 2y agoMaybe things have changed now or I was just a bad react dev but the way hooks works kinda force you to have many child one-off components to not trigger rerenders in the whole component when only a small part was connected to that part of the State being updated. Having all these one-offs components in different files was painful.