react-motion-ui-pack icon indicating copy to clipboard operation
react-motion-ui-pack copied to clipboard

Using spring for 'leave' property produces an error

Open kosChupahin opened this issue 8 years ago • 2 comments

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>
    )
  }

kosChupahin avatar Nov 24 '17 14:11 kosChupahin

+1 here, got the same issue.

write2art avatar Apr 16 '18 11:04 write2art

+2 here, got the same issue.

coder9s avatar Jun 20 '18 05:06 coder9s