Browse Source

Fix Robin Pokorny’s article link (#4867)

Fix Robin Pokorny’s Index as a key is an anti-pattern article link
Notes:
Link is not working neither in my PC nor my phone.
I tried to open it in incognito browser and didn't work.
I don't know the website works in all countries or not but here in Cairo, Egypt doesn't work.
And this is not the first link I encountered doesn't work
main
AbdelRahman Hatem 2 years ago
committed by GitHub
parent
commit
6fa9dedb72
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      content/docs/lists-and-keys.md

2
content/docs/lists-and-keys.md

@ -119,7 +119,7 @@ const todoItems = todos.map((todo, index) =>
);
```
We don't recommend using indexes for keys if the order of items may change. This can negatively impact performance and may cause issues with component state. Check out Robin Pokorny's article for an [in-depth explanation on the negative impacts of using an index as a key](https://medium.com/@robinpokorny/index-as-a-key-is-an-anti-pattern-e0349aece318). If you choose not to assign an explicit key to list items then React will default to using indexes as keys.
We don't recommend using indexes for keys if the order of items may change. This can negatively impact performance and may cause issues with component state. Check out Robin Pokorny's article for an [in-depth explanation on the negative impacts of using an index as a key](https://robinpokorny.com/blog/index-as-a-key-is-an-anti-pattern/). If you choose not to assign an explicit key to list items then React will default to using indexes as keys.
Here is an [in-depth explanation about why keys are necessary](/docs/reconciliation.html#recursing-on-children) if you're interested in learning more.

Loading…
Cancel
Save