Перейти к содержимому

E-commerce with #Directus and #Nextjs - [10] - Add To Cart

Watch and Learn

0:00 / 0:00

E-commerce with #Directus and #Nextjs - [10] - Add To Cart

4 015 просмотров · 4 года назад
Watch and Learn
33,2 тыс. подписчиков
4 015 просмотров · 4 года назад
In this episode we are going to start implementing add to cart functionality. I say start because this is a pretty big functionality so I’m going to split it into two parts. In this first part we are going to create add to cart button, and instead of using something like Redux we are actually going to try to use Directus and React Query for our state management. Directus is going to be used to persist the data in the user session collection that we are going to create. There we will temporarily save the users order and persist the data that way. So we are going to start adding our products to temporary order object in this episode. And in the next episode we are going to finish this functionality by implementing user cart. And display current order that way. Code used in this video https://bit.ly/3InwJt4 You can support my work on Patreon   / watchlearn   Follow me on Social Media Github: https://github.com/ivandoric Twitter:   / ivan_doric   Instagram:   / watchlearntuts   Facebook:   / watchlearntutorials