Skip to content
This repository has been archived by the owner on Sep 13, 2020. It is now read-only.

how to add animationFunction and animationStyle as props to component #351

Open
rraj5422 opened this issue Jul 23, 2018 · 1 comment
Open

Comments

@rraj5422
Copy link

No description provided.

@chicken-suop
Copy link

Did you even look at the code? There's a defaultProps object. It has this:

animationStyle: value => ({
    transform: [{
      translateX: value,
    }],
}),
animationFunction: (prop, value) => Animated.spring(prop, {
    toValue: value,
    friction: 8,
}),

Srly... just have a quick look at the source next time.

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

2 participants