Тёмный

Exploring the Async Behavior of React's useState Hook 

Josh tried coding
Подписаться 157 тыс.
Просмотров 6 тыс.
50% 1

Let's explore the asynchronous behaviour of React's useState hook! When working with useState, the word "async" often gets thrown around. But you can't even await it inside of an async function, so how asynchronous is it really? It's definitely no rocket science but beware of one or two caveats when working with useState in React. Let's take a closer look!
⭐ Our startup: wordful.ai
Thanks for watching and I wish you a lot of fun building your own cool React projects!

Наука

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

 

7 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 12   
@spongebobsquarepants4576
@spongebobsquarepants4576 2 месяца назад
Please use bigger font in future videos. Great explanation!
@user-fr6xu5nn8l
@user-fr6xu5nn8l Год назад
Why is no one talking about closures? , closures is the main cause of the count being 0 in both the (count + 1).
@mohiramansurovna4295
@mohiramansurovna4295 Месяц назад
Thank u so much for the explanation. You helped me with dealing the bug
@okage_
@okage_ Год назад
thank you! i like how you explained how/why using setCount(count+1) isn't good practice since i was wondering what you meant. i will definitely be using prev when i can
@minimatt2338
@minimatt2338 6 месяцев назад
I had no idea about retrieving the previous state, this helped a ton!
@belkocik
@belkocik Год назад
Would love to see more videos like this. It explains very well how React works. :-)
@mdjunaidahmedzama9965
@mdjunaidahmedzama9965 6 месяцев назад
Perfectly explained. We need more videos like this :')
@amanninave9520
@amanninave9520 3 месяца назад
Thank you so much, superb explanation ❤
@mihirgala
@mihirgala 3 месяца назад
this really helped
@EylonxD
@EylonxD Год назад
Great video man, love your channel!
@eligbuefelix7988
@eligbuefelix7988 Год назад
Thank you very much. I really needed this
@dyinginmyroom-gs2gc
@dyinginmyroom-gs2gc 7 дней назад
Do u support AfD?
Далее
Why Signals Are Better Than React Hooks
16:30
Просмотров 474 тыс.
Самое неинтересное видео
00:32
Просмотров 844 тыс.
ПРИКОЛЫ НАД БРАТОМ #shorts
00:23
Просмотров 2,8 млн
UseState: Asynchronous or what?
17:00
Просмотров 65 тыс.
ALL React Hooks Explained in 12 Minutes
12:21
Просмотров 121 тыс.
Decrease Next.js Docker Image Size 15x
5:36
Просмотров 13 тыс.
The Better Way to Load Images
8:46
Просмотров 46 тыс.
useState hook inners. is setState asynchronous or not?
7:58
How Did I Not Know About These React Hooks Before?
13:48
Stop Doing this as a React Developer
12:27
Просмотров 162 тыс.
Fetching Data Doesn't Get Better Than This
6:58
Просмотров 113 тыс.
6 State Mistakes Every Junior React Developer Makes
15:53
Samsung vs Iphone
0:21
Просмотров 27 млн