3 ms·
I have always said: Angular is diffing the model React is diffing the view That’s all. Better to just skip the diffing usually, and grab references to elemen
by EGreg 8y ago
I have always said:
Angular is diffing the model
React is diffing the view
That’s all. Better to just skip the diffing usually, and grab references to elements and update them when certain events happen. It’s really ok!
- quickthrower2 8y agoThe problem is spaghetti! You have something in the Dom and you might not know what can or has updated it or why...
- EGreg 8y agoWhen everything is event based, you know. You can trivially even record the entire call stack on an object attached to the DOM element, when your framework is in debug mode. You can see the whole history of call stacks if you so choose. And there is no waste, either.
- floatboth 8y agohttps://lit-element.polymer-project.org https://lit-element.polymer-project.org lit-html essentially grabs references to elements automatically when parsing a template. You get react-like rendering without any diffing! And does not require build tools.