Mastering React Batch Updating

Published: 31 January 2022
on channel: 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


Watch video Mastering React Batch Updating online without registration, duration hours minute second in high quality. This video was added by user Jack Herrington 31 January 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 44,705 once and liked it 2.2 thousand people.