Тёмный

Why you should NEVER use index as key in React Lists 

Code with Ahsan
Подписаться 18 тыс.
Просмотров 1,4 тыс.
50% 1

In this video, I'm gonna tell you why you should never use index as the key. in React Lists.
You may have heard about it already from other developers that it is not recommended to use the index (or indices) of the item in the array as the key prop when looping over an Array to render a list of items. But if you do it, you'll see that there is literally no issue in doing so. But then...why is it not recommended? Let me show you with an example of why it is bad to use indices as keys in a React app.
Code Repo:
github.com/code-with-ahsan/re...
✨FREE APIs to use for your passion projects ✨
codewithahsan.dev/rapidapi
⭐ Sign up for updates on my Full Stack Developer Course: codewithahsan.dev
⭐ New to code and none of this is making sense? Watch my '5+ RU-vid Coding Bootcamp' in which you will learn HTML, CSS, and JavaScript Fundamentals completely from scratch. It's at codewithahsan.dev/web-dev-boo... and it's 100% free.
⭐ If you would like to buy me a coffee, well thank you very much that is super cool! : buymeacoffee.com/codewithahsan
You can also find me on:
Twitter: / codewith_ahsan
Instagram: / codewithahsan
GitHub: github.com/ahsanayaz
Facebook: / codewithahsan

Наука

Опубликовано:

 

16 дек 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 13   
@FaiyazMohd145
@FaiyazMohd145 8 месяцев назад
Superbly explained
@CodeWithAhsan
@CodeWithAhsan 8 месяцев назад
Thank you
@naseeriyat9241
@naseeriyat9241 Год назад
Thanks for the video
@akashsarki6406
@akashsarki6406 9 месяцев назад
Thanks fo making this.
@CodeWithAhsan
@CodeWithAhsan 9 месяцев назад
Glad it helped
@abubakar-emumba
@abubakar-emumba Год назад
Thanks Ahsan bhai
@CodeWithAhsan
@CodeWithAhsan Год назад
You are welcome! Do share the video :)
@usamahassankhan5270
@usamahassankhan5270 Год назад
Amazing
@CodeWithAhsan
@CodeWithAhsan Год назад
Thanks :) Do share the video
@js-swift
@js-swift Год назад
Sir can you just make a roadmap on reactjs because when React18 came out things changed even now people started using function component instead of class component Please sir and thank for this video
@CodeWithAhsan
@CodeWithAhsan Год назад
Sure. I’ll work on it
@criccric544
@criccric544 Год назад
First. ❤️🤩
@CodeWithAhsan
@CodeWithAhsan Год назад
Let’s go !!! 🙌🏽
Далее
React Keys and Lists - Complete Tutorial!
9:51
Просмотров 6 тыс.
HOC or Higher Order Component in ReactJS
15:23
Просмотров 2,4 тыс.
🛑 до конца!
00:12
Просмотров 86 тыс.
Why do We Need Keys in React?
7:47
Просмотров 10 тыс.
The Key to Understanding React: Why Keys Matter
6:50
Most Senior React Devs Don’t Know How To Fix This
9:25
This is why you need the key property in React
5:44
Просмотров 17 тыс.
React index as key | Don't use index as a key
5:27
Просмотров 3,3 тыс.
Every React Concept Explained in 12 Minutes
11:53
Просмотров 514 тыс.
Telefonu Parçaladım!😱
0:16
Просмотров 29 млн
НОВЫЕ ФЕЙК iPHONE 🤯 #iphone
0:37
Просмотров 342 тыс.
Опасная беспроводная зарядка
1:00