3 ms·
That's not a performance optimization, you're supposed to implement "shouldComponentUpdate" on React components. Not sure what you mean by "spending time fighti
by hcarvalhoalves 12y ago
That's not a performance optimization, you're supposed to implement "shouldComponentUpdate" on React components. Not sure what you mean by "spending time fighting the framework" either, it's one line of logic.
In case you missed the point of the article: it's not that you have to implement that method, but that you've to be careful implementing it because JS has mutable objects by default.
Also, when he's talking about "render" it's not a simple rasterization, it's actually manipulating the document tree and triggering a layout engine. Apples and oranges. If he wanted speed he could render his graphics on a canvas, then your 1985 comparison would make sense.
Let's educate ourselves about the subject before venting?