top | item 42308380

(no title)

jeffmcmahan | 1 year ago

It maps state to a set of reasonably efficient DOM updates that you generally don't have to manage or think about.

Go play around with Angular 1, or BackboneJS, or try building a working SPA with jQuery, and you'll get a sense of the breakthrough that react represented in 2013.

discuss

order

aniforprez|1 year ago

I worked with AngularJS back in 2014-15 and it was hell. We used to regularly have accidental performance dips because of the way it reacted to changes in values. IIRC it used to do two scans of all variables in all the controllers on many browser events, one for checking if something had changed and updating everything else and one for checking if the previous check changed anything that would require further updates. I don't remember the specifics now cause it's been so long but it got really costly really fast for complex applications (we were building real time WebRTC telephony interfaces). React was so much better because it came with restrictions on what changes were being checked and Angular was a total rewrite in Typescript with heavy performance improvements over AngularJS. The virtual DOM stuff truly was a revelation over everything everyone else was doing at the time.

pests|1 year ago

> Go play around with Angular 1, or BackboneJS, or try building a working SPA with jQuery

I have used these in production (and mootools, prototype, and many more) and when these came out they were novel / a breakthrough as well at the time.

My point being is React is no longer a simple transform from state -> UI. Since fibers and concurrent rendering and suspense and server components and hooks and actions it is a much wider framework than you are remembering from 2012.