logoalt Hacker News

steve_taylortoday at 2:33 AM1 replyview on HN

I was all in on Svelte and SvelteKit until I started encountering CSS weirdness caused by a bug that the Svelte developers said is "by design", namely that components' CSS isn't removed from the document after the last instance of that component is no longer rendered. This resulted in a situation in which styles became dependent on the navigation path the user takes, leading to weird an unpredictable layout issues. I couldn't stomach solving this by using Tailwind.

Then Svelte 5 came along and made Svelte more like React. At first, there were just a few simple runes, but then the runes started proliferating like crazy to solve other runes' problems. At that point, Svelte was dead to me and I went back to React/Next.

The right path for Svelte to take would have been to continue to refine Svelte 4.


Replies

maxbondtoday at 2:50 AM

Interesting, so if I'm understanding correctly, component A's style was supposed to change when component B was present, and this was implemented as styling rules in component B? Why was Tailwind necessary rather than moving these rules to component A (which I know would probably require some gnarly selectors)?

I don't want to be a "you should've double bagged it" guy, I'm just curious. Svelte is not the be all and all, if you moved on to greener pastures more power to you.