SanderSpies / react-magician

Declaratively animate React components
http://sanderspies.github.io/react-magician/examples/simple/index.html
166 stars 2 forks source link

Support visibilitychange #3

Open SanderSpies opened 9 years ago

SanderSpies commented 9 years ago

The animation currently does play correctly if you switch tabs due to using Date.now(). A solution for this would be to use the visibilitychange event.

Should work like this: