Skip to content

Instantly share code, notes, and snippets.

@biyootiful
Last active November 2, 2017 21:06
Show Gist options
  • Save biyootiful/28d24ff2ba5979ad8f73dc1059b8c018 to your computer and use it in GitHub Desktop.
Save biyootiful/28d24ff2ba5979ad8f73dc1059b8c018 to your computer and use it in GitHub Desktop.
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