E-commerce with

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.
Code used in this video
bit.ly/3tHGYCs
You can support my work on Patreon
/ watchlearn
Follow me on Social Media
Github: github.com/ivandoric
Twitter: / ivan_doric
Instagram: / watchlearntuts
Facebook: / watchlearntutorials

Пікірлер: 17

  • @alsherifkhalaf7385
    @alsherifkhalaf73852 жыл бұрын

    Big thanks ❤️

  • @odev6764
    @odev67642 жыл бұрын

    amazing tutorial.. won my like to help ... suggestion: maybe you could implement some animations and page transitions with css or if you prefer js you could use framer motion

  • @WatchandLearnTutorials

    @WatchandLearnTutorials

    2 жыл бұрын

    I don't usually implement animations into these kind of series, I barely add styling, but that is just so that it wouldn't look awful.

  • @liu-river
    @liu-river Жыл бұрын

    SUPER DUPER HEAD😂

  • @whatgear_
    @whatgear_2 жыл бұрын

    Also, i really like Directus and i was very surprised by all the features, i heard a lot bad thing about Strapi (Even V4) rest api and graphQL response time and performances, what about Directus? Would you recommend going with Strapi or Directus right now?

  • @WatchandLearnTutorials

    @WatchandLearnTutorials

    2 жыл бұрын

    At this moment I would go with Directus every time. It has bugs, but those are getting squashed very quickly and development is pretty fast, they have a new release almost every week. Strapi just didn't sit well with me after some time, I didn't even test Strapi 4. As for performance, I haven't had any problems, but then I didn't test it with complex Database that has many items in it.

  • @whatgear_

    @whatgear_

    2 жыл бұрын

    @@WatchandLearnTutorials Thanks !

  • @moneyforyourlife7741
    @moneyforyourlife77412 жыл бұрын

    Did you already implemented subscription with stripe or paypal on directus?

  • @WatchandLearnTutorials

    @WatchandLearnTutorials

    2 жыл бұрын

    Nope.

  • @whatgear_
    @whatgear_2 жыл бұрын

    Hello, i i always appreciate your video series, it has been very helpful to me, however, if you had to set up a self hosted e commerce solution, would you really go building it with Directus / Strapi or use OS solutions like Medusa JS and modify it to your requirements?

  • @WatchandLearnTutorials

    @WatchandLearnTutorials

    2 жыл бұрын

    No I wouldn't, but I always do movie database type of thing so I just wanted to switch it up a bit, also I mention in a few videos in this series that this code should not be used for production web shops. Web shop is a nice example because it has a lot of user interactions, but I wouldn't use this for production. I would probably just go with Shopify API or WooCommerce using the REST API. I already have Medusa JS written down for one of the "Let's checkout..." videos, it looks interesting.

  • @alsherifkhalaf7385

    @alsherifkhalaf7385

    2 жыл бұрын

    @@WatchandLearnTutorials Why can't use Directus for production ?

  • @whatgear_

    @whatgear_

    2 жыл бұрын

    @@WatchandLearnTutorials Interesting i'd really like to watch this one.

  • @WatchandLearnTutorials

    @WatchandLearnTutorials

    2 жыл бұрын

    @@alsherifkhalaf7385 You can. But if you are making production web shop it would have to be more robust then what I will show in this course. Here I'm just using web shop to show some Directus/React/Nextjs concepts. You can build upon that, but you would have to make it much more secure and robust to make a real web shop for selling stuff. Otherwise you could run into serious problems especially when you start taking money from people.

  • @alsherifkhalaf7385

    @alsherifkhalaf7385

    2 жыл бұрын

    I will work on security I will change the way by securing requests via api in nextjs I will not use React-query , I will use graphql-request but through api and I will remove all public permissions and creat API USER with static token in .env file to make the website more secure .

  • @kabir52
    @kabir5210 ай бұрын

    If anyone is considering using this as a backend for a NextJS project.... run!

  • @greendsnow

    @greendsnow

    9 ай бұрын

    I'm considering this not for backend but CMS, why? is the newer versions still buggy?