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
pass in a single animated value, or an array of animated values, so unmount will wait for these additional animated value(s) to rest, or if they're already at rest.
pass in a single Promise, or an array of Promises, so unmount will wait for the Promises to resolve.
A real-world use case for (1) above is when animating an interactive chart. Use a Spring value to animate the chart's x/y axis, while useTransition to manage the enter/leave/update of elements on the chart.
// Pass the animated value `x` to the `expires` prop of transition,// so that the unmount event can wait for the X-axis animation to rest,// instead of in the middle of X-axis animation.const[{ x },setAxis]=useSpring(()=>{x: 100});consttransition=useTransition(elements,{ ...props,expires: [x]});
Feature proposal for the new
expires
prop:A real-world use case for (1) above is when animating an interactive chart. Use a Spring value to animate the chart's x/y axis, while
useTransition
to manage the enter/leave/update of elements on the chart.Originally posted by @guopengliang in #809 (comment)
The text was updated successfully, but these errors were encountered: