by savanaly · 3y ago · 0 comments
I'm mainly sad that we'll be losing the chance of any future Kevin Yank videos about Elm. I really love the videos of his I've seen on youtube, including non-Elm ones such as the one about how to use VoiceOver for devs [0].
This is something every framework is up against, since React won. It has become more and more of its own JS dialect, so devs that grow up with it also “think in React”.
For your run of the mill website, this probably doesn’t matter. But for interactive web content, it can absolutely be a competitive advantage to use something faster and more responsive.
Like, I can feel the delay typing in a web browser compared to native, and it drives me crazy. If the output doesn't seem like a direct response to my input, I lose focus. Simple as that, and react seems to be a big part of that problem.
We have ways to go in our apps, but solid has done wonders already. Currently I'm researching state caching and optimistic updates, both of which should also improve it.
Fast enough is a myth. Instant apps are magic.
Especially not React itself. And even if React itself or the way it does things is "too slow" (which is the only metric that counts) then there are escape hatches or ways to deal with that.
What makes React so slow these days?
https://emnudge.dev/blog/react-hostage
It's so easy, that we monkey patch react to debug it https://github.com/welldone-software/why-did-you-render
Plus the vdom... Isn't great, the bundle size puts react at an inherit disadvantage, and the community has a knack for over reliance on bloated packages
There are ways of writing React that result in vast numbers of re-renders... it's not a best practice, but it's relatively easy to make happen, especially if you ignore the official recommendations and pull Stackoverflow answers from 2015.
That would be incredibly rare. Despite the myth propagated, React is unlikely to be faster unless you were doing a ton of interleaved layout-triggering reads and writes. Even naive direct dom-diffing approaches like hyperapp/choo/morphdom can be faster.
That's not really the point made in the article, he mainly talked about the difficulties of maintaining a hybrid codebase split between Elm and another framework, and how their specific company situation nudged them to choose React to go all-in with