[Vuejs]-I loop over 4 objects and render their images while applying a class based on the truthness of a property but sometimes the DOM doesn't rerender

0👍

I think there is some delay in the code, to be safe just make all cards to false then set the active card to true

            makeCardActive(card){
                this.associatedCards = 
                this.associatedCards.map(aC => {
                    aC.active = false; 
                    return aC;
                 });
                this.activeCard.active = false
                card.active = true
                console.log(this.associatedCards)
            }
        },

Leave a comment