For anyone that has a decent understanding of Vue.js, I have a question. I work for a company that uses a Shopify theme along with Vue.js for their front end.
I am currently working on a feature that requires me to render an Add to Cart Button or an Out of Stock Notification depending on how close a customer is to a specific fulfillment center (where our products are shipped from) and how much of that specific product is present at that time.
But the issue is that since this is a regular website that reloads data on every page, the DOM for the vue template I am using is built before the fetch requests involved in this feature get the chance to finish.
I tried to create a property in the data called dataLoaded
which stores a boolean value and use it toggle a loading animation for the add to cart button but the component is not rerendering or triggering the updated Life cycle hook on the component.
Has anyone ever dealt with a situation like this in Vue