News for hackers. Stuff that matters.
Re:Why-did-you-update – Warnings about unnecessary React upd... by acemarke on Wednesday April 19, 2017 @02:57PM (#14150675)
Good explanation, with one nitpick: the diff is done between the _old_ virtual DOM tree and the _new_ virtual DOM tree, not between the virtual DOM tree and the real DOM. That's why you can have a component that renders a single div, and then get the reference to the real DOM node and use jQuery or some other DOM-manipulating library to attach non-React-based DOM elements to the div. As far as React knows, you're just telling it to keep rendering that same div, so nothing needs to change.
Re:Why-did-you-update – Warnings about unnecessary React upd... by Etheryte on Wednesday April 19, 2017 @03:08PM (#14150767)
Thanks for pointing that out, I've updated my comment to fix the mistake.