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.

Problems without global state: Summary

Problems without global state: Summary

Hello and welcome back. Let's continue forward with the real-world example of e-commerce application we did in the previous video. So far, you know that when we are using global state management libraries, we are dealing with a larger piece of state and a single scenario or multiple components would just be dealing with a specific piece or specific piece of the state. Just if we take an example of the cart state, so a scenario is being presented here that if you add to the cart state, like you are adding another item in your cart, then the The product list component needs to be updated in terms of quantity. The product detail component might have to show that product unavailable as this was the last piece of item somebody added in the cart. Or if you are showing a mini cart icon, then that cart icon needs to update the number of items in the cart. Similarly, the checkout page would have to show the updated quantities once the item has been added into the cart. And your order…

Contents