Closed FaizanMostafa closed 3 years ago
what about
...
{showConfetti && <ConfettiComponent />}
Hi there - sorry for the horribly delayed response (new job). Either conditional rendering (like @OG84 mentioned above) or conditionally switching the numberOfPieces
prop would work for your scenario. Take a look at the party mode demo for how to do this.
Hi there, thanks for this wonderful package. I came across this scenario where I don't want to show the play the confetti animation on Confetti's first render. I want to play the confetti animation only when user presses a specific button on the webpage. So far I am unable to achieve this functionality. I am using the following code!
ConfettiComponent.js
ProfilePage.js