Since Apollo Client in v3 can handle local state management, I am curious about the patterns of how it can be used together with an e-commerce project like Shopify using the headless Storefront API with a frontend like Next.js or Hydrogen.
Would I even bother to use the Context API with things like a CartProvider and CheckoutProvider, or would all of this be done somehow in Apollo Client?
Currently I am getting back data from GraphQL which I then save in the Context API, but I am wondering if this is the wrong approach to go as I suppose that means having to update the state in two different places?
I would also like to know of any disadvantage that I would have if I don’t use the state management from Apollo Client, since I believe I can still make use of optimistic UI and so on to have a performant UI and feel without it?
I feel like the state management and its utilisation has not been brought up as much as I would have liked to see, and so hence my topic.