Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I find a lot of Svelte users are pretty religious and hysterically anti-React. When the first version of Svelte Query was announced, people were trashing the API because it looked like hooks and "you don't need those in Svelte", concluding the library must be useless. There's a lot of the "Svelte is the one true way" talk, similar to when Vue was the main alternative to React. The core team seem very reasonable but I think the community has some maturing to do.


I'd consider myself part of the community. I advocated for Svelte and lead two projects in my company, I spoke about Svelte at meet-ups and I did some mentoring around svelte and data visualisation.

And I agree with you. Rich has strong opinions and he likes to stir some discussion. And that's fine, he always responds with nuance and mutual respect. Problem is when community parrots his one liners. If I had a nickel for everytime I got yelled with "vdom is pure overhead!" or "jsx is an abomination, my templates are pure html".

In the end I'm not even sure if it is something specific about Svelte, or just any non-react solution has to bash React loudly.


I was looking at the svelte-query PRs recently, and I didn't see anything that looked like "trashing".

I agree that if you want to keep the patterns that make React-query so amazing, but apply them in Svelte, you should use idioms that make sense in Svelte. The exact syntax (`useQuery` and friends) isn't the point, and the `use[A-Z].*` naming convention actually communicates that you're hooking into the React lifecycle... which obviously doesn't make sense in Svelte.


This could have been a year ago at this stage. It was on r/svelte, if I recall correctly. Svelte doesn't have idioms for reusable reactive logic. The $ sign is used to drive functionality in Svelte, so you can't use it to signify something observable like with RXJS. For Solid, they use createQuery because that is the convention in Solid. For Vue and Svelte, they stick with useQuery. I think the idea is that useX is just a shorthand for "here is some abstracted reactive functionality". Ultimately it has nothing to do with how the reactivity works, it just says, "this function will tie into your reactivity". They could have just called it query, but it seems arbitrary to change the name.


You can absolutely make reusable reactive logic in Svelte, custom stores work great for this.

The problem with "useX" isn't an anti-react one, it's that "use" is an actual thing in Svelte, it's called an action! https://svelte.dev/docs#template-syntax-element-directives-u... :)


> I find a lot of Svelte users are pretty religious and hysterically anti-React.

yes this does happen too, i do acknowledge that. just making very subjective generalizations based on my exp




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: