You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a SpringContext component that can pause, cancel, or finish any animation within its child components.
// Every react-spring animation inside "Home" is affected.constApp=()=>(<SpringContextpause={true}cancel={true}immediate={true}><Home/></SpringContext>)
You can nest SpringContext components to override props for a subtree.
Motivation
Provide an easy way to reduce CPU cycles by pausing animations when they're not visible.
The text was updated successfully, but these errors were encountered:
Don't feel like this is neccessary; you can already achieve this yourself through providing your own context + listening for that context in component's that useSpring and setting immediate/cancel/paused etc.
If you want it natively (I.E Inbuilt context listeners) then just extend animated.div yourself
aleclarson
changed the title
feat: add Animation component
feat: add SpringContext component
May 3, 2020
🚀 Feature Proposal
Add a
SpringContext
component that can pause, cancel, or finish any animation within its child components.You can nest
SpringContext
components to override props for a subtree.Motivation
Provide an easy way to reduce CPU cycles by pausing animations when they're not visible.
The text was updated successfully, but these errors were encountered: