diff --git a/react/README.md b/react/README.md index 747bbe65..3f21dd3b 100644 --- a/react/README.md +++ b/react/README.md @@ -279,6 +279,26 @@
``` + - Avoid using an array index as `key` prop, prefer a unique ID. ([why?](https://medium.com/@robinpokorny/index-as-a-key-is-an-anti-pattern-e0349aece318)) + + ```jsx + // bad + {todos.map((todo, index) => +