Mini Cart And Zustand
In this episode we are going to create a mini cart for our e-commerce site using Zustand state management library.
But we are going to have to change some things that we created in the previous episode to make this work because I miscalculated a bit how this is supposed to work. But those are going to be just small changes.
And you know… these things happen in software development, sometimes you have to change your approach mid way if your assumptions were incorrect or you haven’t thought things through, which I obviously did not.
We are also going to introduce a bit of state management to our app, which I’m not very happy about because I thought we would be able to rely solely on React Query for that, but turns out that we can’t, or maybe I’m missing something and that is why it’s not working properly.
I will show you what I mean during this episode.
But this is not all bad, because I got to play with Zustand - a very light weight state management library, which as you will see is a joy to use.