Re:React 19
by homebrewer on Thursday December 05, 2024 @05:58PM
(#42333815)
What are y'all doing with it that apparently makes it slow? I've been developing a massive react application for the past two years, and it's plenty fast and very responsive even on my mid-2019 middle of the range Android phone. And I'm saying that as someone who refuses to use Electron and trims down Linux desktops to bare essentials to save as much memory and CPU cycles as possible.
It's an interactive business analytics, one of those use cases where an SPA makes sense — 15 years ago it would have been a native desktop application.
We just follow the usual guidelines, no extraordinary optimization techniques or anything like that.
Have you don't nothing to optimize it? One pattern we've had to adopt is wrapping every component in react.memo
Why is fast guaranteed with two way binding frameworks?
Virtual DOM is not inherently an issue. Many libraries use it and are much faster than React.
The main issue is React forces you to tell it which components to re-render. This causes a bloat of ceremony that makes it endlessly annoying (in comparison to global redraws) to write in.
> React forces you to tell it which components to re-render
That's a really weird statement, do you keep your application state in a mutable data structure instead of immutable? Do you know what a pure component is?
Being mindful of the never-ending-nirvana frontend spirit of churn, and after doing web development in VBScript, JS, JQuery, Mootools, Applets, Actionscript, YUI/Ext/Sencha, Backbone, Knockout, Angular1, Angular2, React, Vue1 – I'd say try Flutter. It's genuinely a breath of fresh air.
Except... Dart. If only Flutter was in Typescript it might have been a bit closer to nirvana. The Dart part is still keeping the frontend spirit of churn alive.