Would it be possible to have different animation config for enter and leave of Transition? it makes sense to enter slower but leave faster
That’s possible, config can be a function that receives the item and the state (enter, leave, ...) and returns a new config.
@drcmda can you help provide a code example?
useTransition({ config: (item,state) => {
switch (state) {
case "enter": return { tension: 50 }
case "leave": return { friction: 100 }
}})
Thanks, is it possible using render props? we are still largely using React class component
On 16 Feb 2019, 10:03 AM +0800, Paul Henschel notifications@github.com, wrote:
useTransition({ config: (item,state) => {
switch (state)
case "enter": return { tension: 50 }
case "leave": return { friction: 100 }
})
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Sure, it’s the same
@drcmda Thanks
Most helpful comment