You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be bad practise to use a mapping function's index as the keys to the generation of multiple children, as it may cause unexpected results when the data source would get updated, especially on the addition/removal of items. The fix would be to use some kind of id would within the data source that makes each item unique, though I understand that this may be outside the scope of your learning modules as you're surely trying to show the fundamentals of React.
May be outside the scope of your learning modules, but thought I'd drop this here in case you were interested.
https://medium.com/@robinpokorny/index-as-a-key-is-an-anti-pattern-e0349aece318#.9wchkw5td
It would be bad practise to use a mapping function's index as the keys to the generation of multiple children, as it may cause unexpected results when the data source would get updated, especially on the addition/removal of items. The fix would be to use some kind of id would within the data source that makes each item unique, though I understand that this may be outside the scope of your learning modules as you're surely trying to show the fundamentals of React.