News for hackers. Stuff that matters.
Re:Optimizing React Rendering by evan_ on Thursday May 25, 2017 @02:05PM (#14418966)
keep in mind that changing the key will completely destroy and create a new element- a more expensive operation if all that's necessary is changing the class or something
Re:Optimizing React Rendering by dounan on Thursday May 25, 2017 @02:10PM (#14419000)
nit: new component instance (not element)
Re:Optimizing React Rendering by evan_ on Thursday May 25, 2017 @04:21PM (#14419844)
I think we're both right- I believe it will create a new element and a new DOM element, rather than mutating the existing ones.
Re:Optimizing React Rendering by dounan on Thursday May 25, 2017 @06:51PM (#14420758)
You're right. I misinterpreted your first comment to refer be referring to React elements, which is quite different from DOM elements https://facebook.github.io/react/blog/2015/12/18/react-compo...