xtcnorbi
TTCTheo's Typesafe Cult
•Created by xtcnorbi on 4/24/2023 in #questions
Global state management in T3.
Hi, this is probably a nooby question but would recommend me to use zustand in this case?:
I have a cart which lives on the Navbar.
Item Page has a „add to cart” button. I want to open the cart after clicking this button. This is a cart that lives in the database so I could maybe try open it onSuccess as it will be refetched after clicking the button, but it would also mean the cart would be open on initial render of the site :/
Cheers
8 replies
TTCTheo's Typesafe Cult
•Created by xtcnorbi on 4/3/2023 in #questions
Item cart session/ctx or backend?
I want to create a cart functionality for my shopping app and I am wondering which approach should I choose for implementing it. I thinking more towards using session but I can't figure out where I can add new stuff to it. Would anybody share their opinion on this topic? Also if you know how to add custom stuff to session and then add some objects to it on some interaction that please share you knowledge. Thanks!
3 replies