Mastering React Batch Updating

Опубликовано: 31 Январь 2022
на канале: Jack Herrington
44,705
2.2k

Turns out useState might not be as simple as you think, and calling the set state function at the wrong time might result in React not batching state updates and might hurt your performance or cause bugs. Let's dig deep into this and figure out when React batches updates, when it doesn't and how to fix that.

👉 I'm a host on the React Round-Up podcast: https://devchat.tv/podcasts/react-rou...
👉 Don't forget to subscribe to this channel for more updates: https://bit.ly/2E7drfJ
👉 Discord server signup:   / discord  
👉 VS Code theme and font? Night Wolf [black] and Operator Mono
👉 Terminal Theme and font? oh-my-posh with powerlevel10k_rainbow and SpaceMono NF

0:00 Introduction
1:37 Going Asynchronous
4:19 Fixing The Bug
5:49 Batching Updates in React 16 & 17
6:28 Upgrading To React 18
8:16 Fixing The App The Right Way
9:55 Outroduction

#react #batch_updates


Смотрите видео Mastering React Batch Updating онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Jack Herrington 31 Январь 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 44,705 раз и оно понравилось 2.2 тысяч людям.