« Maybe a tree is not the way we should organize code. »
I’ve been convinced about this for a while.
That’s why I’m building Tuan, a VSCode extension that offers a new way to explore code beyond the file tree. (the video is a mvp)
(waitlist just opened, link below)
The more Svelte code I write the more I like it
I've written a ton of React as well and on paper it seems better:
- multiple components per file
- no new "magic", just normal js (.map instead of #each)
- stronger composability
And yet the more I write both the more I find Svelte to be way more natural for two reasons:
1. Svelte is an extension of html & React is well React
2. The runes primitives feel REALLY good, especially when used with .svelte.ts files. Making a class with $state variables and the logic to work with them all in one place is so damn good
There's just so much more friction in React to make what I want even if on paper it is better, I find Svelte just so much more pleasant and productive to write.
In the past I was really critical of the "single component per file" thing in Svelte, but the more Svelte 5 I write, the more I don't actually want more components in one file. The pieces that I would want to abstract out are almost always logic pieces, which I can now easily do in a .svelte.ts file with a clean little class, it just feels so damn good. I can't imagine a way you make multiple components in one Svelte file without making me like it less. I don't want to have to define a function, I want to write html and add some reactivity, and Svelte is the most natural way to do it.