react-motion-ui-pack
react-motion-ui-pack copied to clipboard
Using spring for 'leave' property produces an error
Hi,
It works fine when I'm using a spring for the 'enter' property, but returns the following error if I use a spring for 'leave':
"NaN is an invalid value for the opacity css style property. Check the render method of nameComponent"
Could you please help me to understand what's wrong here?
render(){
const {text} = this.state
return (
<Transition
component={false}
measure={false}
enter={{
opacity: spring(1, {stiffness: 170, damping: 25 }),
}}
leave={{
opacity: spring(0, {stiffness: 170, damping: 25 }),
}}
>
{text !== '' && this.renderTextInfo(text)}
</Transition>
)
}
+1 here, got the same issue.
+2 here, got the same issue.