48 ms·
> This feels wrong - either the API, the framework, or the language isn't powerful enough to ensure that someone does the right and performant thing. It's the
by lmm 1y ago
> This feels wrong - either the API, the framework, or the language isn't powerful enough to ensure that someone does the right and performant thing.
It's the language. React uses a bunch of magic methods and requires you to follow rules about when to call them, with limited guardrails, because if you try to make developers do this properly (with higher-kinded types and monads) they throw their toys out of the pram. Our culture prefers "there are a bunch of subtle rules you have to follow and if you break them you'll get weird bugs or performance issues" to "there are a bunch of explicit rules you have to follow and if you break them your code won't compile", sadly.
- wk_end 1y agoIs there something out there (in TypeScript, preferably) that does things in the way that you’re describing?
- vermilingua 1y agoSvelte is a lot closer to that latter style, there are a lot of React weirdnesses that just aren’t possible in Svelte (because it’s a compiler, not a framework)
- 5Qn8mNbc2FNCiVV 1y agoI'd rather break my hands than use Svelte instead of React again. It comes with so many problems of itself. Summarized in a single sentence though it would be: It's more common than you'd like it to be, that your UI doesn't actually reflect the state of your application.
- agos 1y agoI was considering investing in learning Svelte to avoid some of the React quirkiness, but this is not very promising. Can you share a bit more? Trading off a set of quirky annoying things for an equivalent or worse one would be suboptimal.
- owebmaster 1y agoSvelte promises to be better than React but in the end it is not - and I hate React. React is a world on its own inside the frontend and Svelte did exactly the same, it is just different unnecessary complexity. And they even change everything every couple of years just like React.
- zapt02 1y agoI'm not sure what you're actually trying to say by that. Svelte has fine-grained opt-in reactivity. If you don't declare a variable with $state, it won't be reactive. That's by design and not a problem.
- lmm 1y agoTypeScript isn't powerful enough, but take a look at how the PureScript bindings do it.
- worble 1y agoNot typescript, but elm essentially promises that. Unfortunately it's been pretty much abandoned while barely scratching the surface of javascripts api (and had drama when the community attempted to make their own native code)
- hboon 1y agoI use Vue (and had use React for a while) and Vue is much more intuitive to me.
- ileonichwiesz 1y agoIn my experience it just abstracts all the same issues behind its own custom syntax - you’ll still eventually run into the classic problem where your entire grid rerenders when you change a single cell, but it’s going to be that much trickier to debug because it’s not just regular Typescript.