Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
evan_
9y ago
0 comments
Save
Share
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
0 comments
3 comments · 1 top-level
top
newest
oldest
dounan
9y ago
· 2 in thread
nit: new component instance (not element)
evan_
OP
9y ago
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.
dounan
9y ago
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...
j
/
k
navigate · click thread line to collapse