Last active
November 2, 2017 21:06
-
-
Save biyootiful/28d24ff2ba5979ad8f73dc1059b8c018 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Intro extends Component { | |
state = { | |
springVal: new Animated.Value(0.8), | |
}; | |
componentDidMount() { | |
setTimeout(() => this.spring(), 2000); | |
} | |
spring() { | |
Animated.spring(this.state.springVal, { | |
toValue: 17.5, | |
friction: 7, | |
tension: 20 | |
}).start(); | |
} | |
render() { | |
return ( | |
<View style={styles.wrapper}> | |
<View style={styles.center}> | |
<Animated.Text | |
style={{ | |
transform: [{ scale: this.state.springVal }] | |
}} | |
> | |
<Text style={styles.introText}>biyootiful</Text> | |
</Animated.Text> | |
</View> | |
</View> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment