Index as a key is an anti-pattern

todos.map((todo, index) => (
<Todo {...todo} key={index} />
));
}

--

--

--

Zealous Engineer — TypeScript & Tech Leadership — Speaks — Loves maths — Reads specs — Vzhurudolu.cz podcast — Lives in Berlin

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Best JavaScript IDEs and Code Editors To Use In 2020

Create and Publish React native app in Google play store.

How to reset selected day based on disabled dates, starting day, ending day in…

YouTube Video |Image Search App using unsplash API in ReactJS — 1

The top advantages of Angular9 Ivy: The future-generation Compiler!

How to get the project ID in a Java Cloud Function?

Creating My Personal Website with Nuxt

Let’s Revisit Natural Sorting in JavaScript

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Robin Pokorny

Robin Pokorny

Zealous Engineer — TypeScript & Tech Leadership — Speaks — Loves maths — Reads specs — Vzhurudolu.cz podcast — Lives in Berlin

More from Medium

React, ViteJS, TypeScript, and Jest

Reusable Combobox/Dropdown Component React (Compound pattern)

Protected Routes with react-router-dom v6

React Comments and @ Mentions