Тёмный

You can’t use hooks conditionally… or can you? - Charlotte Isambert - RNL May 2023 

Pusher
Подписаться 17 тыс.
Просмотров 633
50% 1

Charlotte Isambert - Mobile developer at Bam.tech discussing “You can’t use hooks conditionally… or can you?”
[00:00:00] Intro - The Use Hook
[00:01:34] Why can useContext be used conditionally?
[00:02:07] Where is data stored?
[00:03:10] A fibre
[00:04:06] First Render
[00:05:38] Where is hooks data stored?
[00:07:12] Why can't we use hooks conditionally?
[00:08:45] Why is useContext different?
[00:12:16] How is a context value updated?
[00:13:47] Duplicate fibre tree
[00:15:02] Executing function component
[00:18:16] Update context objects
[00:24:12] Memorise component
[00:27:09] Greetings
[00:29:56] Conclusion
[00:31:28] Q&A
In this presentation, we explore the concept of hooks in React and why calling them conditionally can cause issues. We learn that hooks store their data inside a linked list within the fiber tree, and the order in which hooks are called matters. However, we discover that the useContext hook is an exception and can be used conditionally without affecting other hooks. This is because useContext retrieves its value from a separate context object outside the tree. We also get insights into how React updates context values and components during rendering. Join us to gain a deeper understanding of hooks and context in React development.
_________________________________________________________________
About Pusher Sessions:
We're bringing the meetup to you. With Sessions, you can watch recordings of top-notch talks from developer meetups -- wherever and whenever you want.
Meetups are a great way to learn from our peers and to keep up with the latest trends and technologies. As developers ourselves, we at Pusher wanted to bring this great content to more people... So we built Sessions. On Sessions, you can watch talks that interest you and subscribe to be notified when new content gets added.
If you run a meetup and want to get involved, kindly get in touch.
_________________________________________________________________
About Pusher:
Pusher is a hosted service with APIs, developer tools and open source libraries that greatly simplify integrating real-time functionality into web and mobile applications.
Pusher will automatically scale when required, removing all the pain of setting up and maintaining a secure, real-time infrastructure.
Pusher is already trusted to do so by thousands of developers and companies like GitHub, MailChimp, the Financial Times, Buffer and many more.
Getting started takes just a few seconds: simply go to pusher.com and create a free account. Happy hacking!

Наука

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

 

30 июн 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 2   
@anilrai1299
@anilrai1299 11 месяцев назад
MIndblowing explanation
@noahhall1502
@noahhall1502 Год назад
excellent!
Далее
tRPC, gRPC, GraphQL or REST: when to use what?
10:46
Просмотров 71 тыс.
3M❤️ #thankyou #shorts
00:16
Просмотров 4,1 млн
How to Start a Speech
8:47
Просмотров 19 млн
Самый СТРАННЫЙ смартфон!
0:57
Просмотров 35 тыс.
Main filter..
0:15
Просмотров 12 млн