Closed just-boris closed 8 years ago
Thank you @just-boris! I've heard that using index
makes the diffing algorithm less efficient, do you think it would make sense to make it items.map(item => <div key={index.id}></div>)
?
@jeffcarp Updated PR.
This is okay for me. My goal is showing that key always necessary in React, rather than other frameworks
Excellent, thanks for the contribution @just-boris 👍 🎉
While other frameworks can take care about repeating items, React requires special key attribute. There is a section in React documentation about this.
Unless you do it, you will get a warning from React in developer mode.