- Notifications
You must be signed in to change notification settings - Fork61
Open
Description
Code
<ConfettiCannoncount={300}autoStartDelay={400}fallSpeed={3000}explosionSpeed={500}fadeOutorigin={{x:Dimensions.get('window').width/2,y:0}}/>
When I try to resize the window anytime during or after the animation it gets really laggy and the other components get all jittery.
To solve this for now I remove the component after 5 seconds completely
functionComponent(){const[showConfetti,setShowConfetti]=useState<boolean>(true);useEffect(()=>{setTimeout(()=>{setShowConfetti(false);},5000);},[]);return(<>// other stuff on the screen{showConfetti&&(<ConfettiCannoncount={300}autoStartDelay={400}fallSpeed={3000}explosionSpeed={500}fadeOutorigin={{x:Dimensions.get('window').width/2,y:0}}/>)}</>);}
Anyone know a better way to get around this.
Metadata
Metadata
Assignees
Labels
No labels