I want to add class again and again on click handleClick in minicart I got two separate components one component contain the handleClick and other component is the minicart.
Is there any way I can do this? I am trying this code on handleClick but this doesn't work
useEffect(() => {
document.querySelector("#minicart-id").classList.add('animate-bounce');
});
If I try this without useEffect it works but it only add class one time.