Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Performance is really bad even after the animation is finished. #70

Open
@rickwillcox

Description

@rickwillcox

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp