React-spring: "export 'Spring' was not found in 'react-spring'

Created on 2 Mar 2019  路  1Comment  路  Source: pmndrs/react-spring

Hi, I'm trying to use react spring in my gatsby application, but I'm getting this error when I tried to use it
"export 'Spring' was not found in 'react-spring'

I imported it like this
import { Spring } from 'react-spring'

This is how I'm using it

<Spring
          from={{height:100}}
          to={{height:200}} >
        {styles => (
          <div style={{overflow:'hidden',...styles}}>
          <Img fluid={data.file.childImageSharp.fluid}/>
          </div>
        )} 
</Spring>

I also made sure that the react-spring is included in my node modules

Most helpful comment

it's import { Spring } from 'react-spring/renderprops'

See: https://www.react-spring.io/docs/props/spring

>All comments

it's import { Spring } from 'react-spring/renderprops'

See: https://www.react-spring.io/docs/props/spring

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fortezhuo picture fortezhuo  路  3Comments

mkhoussid picture mkhoussid  路  3Comments

VincentCtr picture VincentCtr  路  3Comments

szahn picture szahn  路  3Comments

sakhisheikh picture sakhisheikh  路  3Comments