Complete Guide to React Hooks - useContext Hook
The useContext hook is used to manage the global state. What do we mean by a global state? There are some values that you want to access inside all your components no matter how deeply nested that component is in the component hierarchy so instead of passing props from component to component, what you can do is use the useContext hook to create a global state that can be accessed from any component no matter how deeply nested it is.
To use this hook first we need to create a context inside the root component. Then you need to wrap that root component with a context provider. Inside the child component or any other component we intend to access the value stored in the global state, we can use the useContext hook.
useContext Hook
how to use the useContext Hook
By the end of this video, you'll have a clear understanding of what the useContext Hook does and how use it in your component.
If you want to dive deeper into this topic, I recommend checking out my article on the complete guide to React Hooks.
https://dev.to/kalashin1/the-complete-guide-to-react-hooks-2elo
Don't forgdet to follow me on:
Twitter: https://twitter.com/netcreed
Our videos are on JavaScript, Typescript, and NodeJS. We are dedicated to helping you and developers at large become better at what they do. We will keep you updated by sharing insights and tips on your beloved web technologies. Thanks for watching!
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Complete Guide to React Hooks - useContext Hook», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.