useContext | React Hooks Tutorial #5

Опубликовано: 06 Апрель 2021
на канале: Philip Fabianek
2,078
67

In this episode of my React Hooks Tutorial, we will dive into the useContext hook and demonstrate, how to use it. We will learn about React context API including context providers and consumers. We will also learn how we can change context value using useState which will result in a change in all of our nested components.

Starting repository:

https://github.com/philipfabianek/rea...

Ending repository:

https://github.com/philipfabianek/rea...

Timestamps:

►0:00 Introduction
►0:10 Importing the useContext hook
►0:30 Explaining how React context works
►1:08 Creating a nested component
►1:33 Creating React context using React.createContext()
►1:54 Providing React context using the Provider component
►2:39 Acessing React context using the useContext hook
►3:46 Changing context value using the useState hook
►4:54 Ending

Social Media:

►Twitter:   / philip_fabianek  
►LinkedIn:   / philip-fabianek  
►Website: http://www.philipfabianek.com
►GitHub: https://github.com/philipfabianek


На этой странице сайта вы можете посмотреть видео онлайн useContext | React Hooks Tutorial #5 длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Philip Fabianek 06 Апрель 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 2,078 раз и оно понравилось 67 зрителям. Приятного просмотра!