From the course: Build Modern Web Apps with React, Hooks, State Management, and APIs Using Vite or Next.js

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Context API: Recap

Context API: Recap

Hello and welcome to lesson number 3. In this lesson, we are going to deep dive into context API, recap what we have learned so far about the context API and we are going to learn tricks about the optimization. Before diving forward to the state management libraries, we should be well aware and do a recap of the things that we know so far. It's important to have full command on the things you have learned previously before diving into something that is advanced level. So in this lesson we are going to in this lesson we are going to quickly recap the context API and what we know so far about it. It provides a global state management for us but at a small level and it helps us avoid the prop drilling problem. The first way to have state management is via passing the props and lifting the state up. And the second approach is by using the context API. It can be very useful if you have scenarios like you want to keep authentication data that which user is locked in currently at the moment.…

Contents