Don't do this in React
Автор: FreakeyCodes
Загружено: 2025-08-03
Просмотров: 663
Описание:
Many React devs (including me at some point) use the index as the key when mapping over lists. But here’s why that’s a bad idea…
In this short, I explain why you should avoid using array index as a key, and what to do instead — like using a unique ID from the API, or a combo of stable properties that ensure uniqueness.
🚫 Avoid unnecessary re-renders
✅ Build more predictable UIs
Drop a 🔁 if you’ve done this before — and follow for more React best practices!
#react #frontend #nextjs
🌎 Find Me Here:
website: https://dev.osonwa.com
twitter: https://x.com/_osonwa
github: https://github.com/goodnewsj62
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: