Re:Why and How We Retired Elm at Culture Amp
by internetter on Saturday April 08, 2023 @04:49PM
(#35497479)
Sure, to some degree, but you have to wonder why it's so easy for developers to footgun themselves. It's the fault of the language, imo, not bad developers.
Re:Why and How We Retired Elm at Culture Amp
by Marazan on Saturday April 08, 2023 @05:00PM
(#35497575)
React is easy to use without understanding the component lifecycle. The penalty is poor performamce rather than a non-functional app.
You saw the same thing in the before times with Adobe Flex. So much code from people who had no understanding of the lifecycle - apps that worked but were appallingly slow and buggy.
Re:Why and How We Retired Elm at Culture Amp
by justrealist on Saturday April 08, 2023 @04:52PM
(#35497507)
I've never seen a language or framework that is both easy to be quickly productive in, and free of footguns.
React is easy to be quickly productive in... thus, it has footguns.
Re:Why and How We Retired Elm at Culture Amp
by Yoric on Saturday April 08, 2023 @04:51PM
(#35497493)
What would prevent that?
Re:Why and How We Retired Elm at Culture Amp
by internetter on Saturday April 08, 2023 @05:26PM
(#35497796)
I believe the term is "fine grained reactivity". Basically, components do not rerender when data updates, only the specific part of the DOM dependent on that data.
This alleviates all the footguns that come with rerenders (including the infamous infinite loop) and often results in cleaner code.
I'm partial to solid[0] (there are hundreds of comparison articles that illustrate the DX improvement, but a couple are [1] and [2]). I believe svelte is similar and vue is experimenting with this as well
Re:Why and How We Retired Elm at Culture Amp
by jakelazaroff on Saturday April 08, 2023 @10:34PM
(#35499595)
That isn’t always true. Reactivity can make updates faster, but adds more overhead to creating DOM nodes because you need to set up the subscriptions that are used to eventually update them.
To steal a phrase originally about VDOM: “reactivity is pure overhead”. Nothing comes for free!
Re:Why and How We Retired Elm at Culture Amp
by internetter on Sunday April 09, 2023 @04:48PM
(#35506338)
Maybe in theory, but solid still outperforms react in creations by a considerable amount, and I think most applications will find they are doing a lot more rerenders than insertions anyway
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.