Skip to content

Animation triggers twice #861

Discussion options

You must be logged in to vote

I think Elisabeth is right, in that it seems to be due to the number of times the component is rendering.

I would consider 2 things to potentially fix this.

  1. Sync your timeouts. At the moment you have some timeouts at 1100, and one in App.js at 200. These will then cause the components to rerender around 900ms apart (which might be causing the flash). Do we need the 200ms timer now that the swipe animation is working?

  2. Maybe consider moving the isAnimating state and logic to the Flashcard component. That means you will have the state local, rather than ALL the cards in your list getting the isAnimating.

Hopefully these help! Great work so far.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@onemanwenttomow
Comment options

Answer selected by IsabellUrban
@IsabellUrban
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Web
Labels
None yet
3 participants