useEffect Hook - React In Depth
Let's learn side effect and the useEffect hook together in React.
We start off with an overview of the useEffect hook and it's place in the React ecosystem.
Then, we start getting in to the syntax of useEffect and how the dependency array argument works in regard to the effect function.
We then take a look at the cleanup function and how this fixes some issues with side effects and what we need to be aware of. We take a look at a specific example with setInterval and fix it with a cleanup.
We wrap up the video with an overview on rendering react trees and what useEffect looks like in the computer's memory.
Chapters:
00:00 Introduction
01:26 useEffect Hook Intro
05:15 High level use cases
06:37 Component Lifecycle
09:04 useEffect Syntax
10:54 No dependency array
12:19 Code Example - no dependencies
16:20 Empty dependency array
17:44 Code Example - State dependencies
24:29 State dependency array
35:43 useEffect Cleanup Functions
37:37 On-mount Cleanup Code Example
40:00 Re-render Cleanup Code Example
42:47 State Cleanup Code Example
44:22 Cleanup Function Visuals
45:03 Bugs without cleanup
52:45 Fixing Bugs with Cleanups
56:31 React Trees and Rendering
58:09 useEffect in Memory
59:20 Next Steps
? Github Repository with the notes and exercise code+solutions: https://github.com/Nooder/react-in-depth
? Come join us on Discord to chat with a like-minded community about tech and learning: https://discord.gg/K4nkugP7Gd
?Support the channel and content through Super Thanks, Channel Memberships, or on Patreon: https://www.patreon.com/TechWithNader
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «useEffect Hook - React In Depth», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.