azazdeaz / azazdeaz/react-gsap-enhancer

Not run the animation when the page is loading

Open
#36 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
730
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Hello,

Actually, i added the animation to a variable but when the page is loading the animation is run but i just want to run the animation in future handler not when the page is loading. Is that possible ?

This is working but i do not want to the animation run immediately.
`componentDidMount(){
window.animCircleNext = this.addAnimation(createAnim2Test)
} `

Regards.

Contributor guide

Open the contributing guide

Research direction

Start from the componentDidMount example and the addAnimation call shown in the issue. Trace when the returned animation is executed versus when it is assigned to window.animCircleNext, then check whether the existing API documents a deferred invocation pattern. Done means the animation does not run during page loading and can still be triggered by a later handler.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.