Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

Using spring for 'leave' property produces an error #91

Open
kosChupahin opened this issue Nov 24, 2017 · 2 comments
Open

Using spring for 'leave' property produces an error #91

kosChupahin opened this issue Nov 24, 2017 · 2 comments

Comments

@kosChupahin
Copy link

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>
    )
  }
@write2art
Copy link

+1 here, got the same issue.

@coder9s
Copy link

coder9s commented Jun 20, 2018

+2 here, got the same issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants