Загрузка видео...
Не удалось загрузить видео
Thanks to `flushSync`, you can finally manage focus in React again 🙌 (but I will always love this.setState)
598,988 просмотров • 2 лет назад •via X (Twitter)
Комментарии: 10

Actually I think it showed up in React 16? I dunno, but pretty sure I didn't see it documented until React 18.

this is a great video and flushSync() is a good API, but FWIW, this could potentially be solved by giving the effect more info about what happened

For those wondering how he shows the active element in the console automagically:

see Ryan now I feel bad about my genius solution 😔 fine I'll refactor it...

Based on some of the responses to this, I feel like you need to add a chyron for each section like "This is the wrong way" and "This is the right way"

Haha for real. I have to live my life expecting them to watch the whole video, read the whole article, and RTFM, otherwise I will be mentally crippled.

Great explanation, thanks! Cannot wait to be asked about this in an interview now

Oh no 🤦🏼♂️

That useEffect bug! With the mounting! I also deeply appreciate calling that code “non-essential”, thanks for this. It also may have convinced me to use co-pilot.

Oh geez, co-pilot is my homie
Похожие видео
Sensitive content
“being apart this time, i don’t know when we will meet again. but whenever i can feel the wind blow, i’ll always think of you. i love you” OH MY GODDDD 😭 THE AIR FINAL EPISODE #เสน่หาวาโยตอนจบ
girlfreen
16,695 просмотров • 1 месяц назад
