Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //from the example in https://facebook.github.io/react-native/docs/animations.html
- componentDidMount() {
- //look ma, you're changing a stateful value directly!
- this.state.bounceValue.setValue(1.5);
- //not sure how this works under the hood, but it looks to be doing the same thing
- Animated.spring(this.state.bounceValue, {
- toValue: 0.8,
- friction: 1,
- }).start()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement