Тёмный

React index as key | Don't use index as a key 

Weibenfalk
Подписаться 19 тыс.
Просмотров 3,4 тыс.
50% 1

Short video on why you shouldn't use index as a key in react.
Support me by subscribing to this channel ❤️
Do you want to master #react, #gatsby, or #svelte fast? ⏩ 🚀 👩‍🚀
Check out my premium courses at www.weibenfalk.com
-
Find me somewhere below:
Website: www.weibenfalk.com
Udemy: www.udemy.com/user/thomas-928/
Linkedin: / thomas-weibenfalk-7635...
Twitter: / weibenfalk
Github: github.com/weibenfalk
FreeCodeCamp: www.freecodecamp.org/news/aut...
Dev.to: dev.to/weibenfalk

Наука

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

 

27 май 2020

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 9   
@i_dont_likevodka3062
@i_dont_likevodka3062 2 года назад
very useful. Thanks!
@alimanzoor2359
@alimanzoor2359 4 года назад
kindly make a short video on auth snippet with ReactJs + Immer
@vincenguyendev
@vincenguyendev 3 года назад
Hi do we have the github source for the example , it would be great
@sunguru981
@sunguru981 4 года назад
So in short, using indexes as keys is directly related to a time complexity of O(n), just like an array .. whereas using some database ids as indexes is directly related to a time complexity of O(1) .. Coollll ...
@devinsights8021
@devinsights8021 2 года назад
What font do you use?
@Weibenfalk
@Weibenfalk 2 года назад
Operator mono
@smsibasish
@smsibasish 4 года назад
Is this an issue only when removing an item?
@Weibenfalk
@Weibenfalk 4 года назад
I haven't thought of all the cases but it's an issue when you re-order things .. as one item is removed they get "re-ordered" ... as you see in the video also it's not always an issue when removing the item. If you remove the last one it works. =)
@smsibasish
@smsibasish 4 года назад
@@Weibenfalk aah that makes sense. Thanks!
Далее
Все ли вы знаете о React key?
8:47
Просмотров 37 тыс.
HOC or Higher Order Component in ReactJS
15:23
Просмотров 2,4 тыс.
Thoughts About Unit Testing | Prime Reacts
11:21
Просмотров 215 тыс.
I've been using Redis wrong this whole time...
20:53
Просмотров 345 тыс.
React Compiler / React Forget - with Vite
5:27
Micro-Frontends in Just 10 Minutes
11:00
Просмотров 223 тыс.
Why Signals Are Better Than React Hooks
16:30
Просмотров 466 тыс.
The mystery of React key: how to write performant lists
13:22
The Key to Understanding React: Why Keys Matter
6:50
You are using useFetch WRONG! (I hope you don't)
11:14
Dependency Injection, The Best Pattern
13:16
Просмотров 780 тыс.
How to Soldering wire in Factory ?
0:10
Просмотров 8 млн