react-confetti icon indicating copy to clipboard operation
react-confetti copied to clipboard

Stuttering performance

Open ryancwalsh opened this issue 2 years ago • 0 comments

Hi, I'm using <Confetti width={width} height={height} recycle={true} numberOfPieces={1_000} /> and have it set to disappear after a 10-second timer.

It works pretty well! 😁

I also started using Dexie.js to do lots of operations at the same time, and that can cause Confetti's performance to get choppy.

I started exploring https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame and startTransition from https://react.dev/blog/2022/03/29/react-v18#what-is-concurrent-react.

But I wonder if you already have ideas and tips.

Thanks for your amazing component!

ryancwalsh avatar Sep 14 '23 23:09 ryancwalsh