Hi Shopify Dev Community,
I am currently developing a Shopify app using the MERN stack, and I am facing an issue with updating the cart drawer dynamically.
The problem arises when trying to sync the cart drawer with updates from the backend (e.g., when adding or removing items). While I can see the updates reflected in the database, the cart drawer on the storefront does not update in real time without refreshing the page.
I have implemented both Shopify APIs and custom React components to handle this, but the cart drawer still doesn’t behave as expected.
I’ll share the relevant parts of my code in the post below for context. Any guidance or suggestions would be greatly appreciated!
Thanks in advance!