So Why index can't be Key of react element (in arrays).
Thanks.
It's a bad idea to use the array index since it doesn't uniquely identify your elements. In cases where the array is sorted or an element is added to the beginning of the array, the index will be changed even though the element representing that index may be the same. This results in unnecessary renders.
https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md
Hey there! We use the issue tracker for bug reports and feature requests.
If you have a question, please check our community support resources:
https://facebook.github.io/react/community/support.html
Please check out the documentation.
https://reactjs.org/docs/lists-and-keys.html#keys
https://medium.com/@robinpokorny/index-as-a-key-is-an-anti-pattern-e0349aece318
https://reactjs.org/docs/reconciliation.html#recursing-on-children
https://reactjs.org/docs/reconciliation.html#keys
Most helpful comment
Please check out the documentation.
https://reactjs.org/docs/lists-and-keys.html#keys
https://medium.com/@robinpokorny/index-as-a-key-is-an-anti-pattern-e0349aece318
https://reactjs.org/docs/reconciliation.html#recursing-on-children
https://reactjs.org/docs/reconciliation.html#keys