Advertisement
Guest User

Untitled

a guest
Aug 25th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. //from the example in https://facebook.github.io/react-native/docs/animations.html
  2. componentDidMount() {
  3.  
  4. //look ma, you're changing a stateful value directly!
  5. this.state.bounceValue.setValue(1.5);
  6.  
  7. //not sure how this works under the hood, but it looks to be doing the same thing
  8. Animated.spring(this.state.bounceValue, {
  9. toValue: 0.8,
  10. friction: 1,
  11. }).start()
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement