Skip to content

Instantly share code, notes, and snippets.

View biyootiful's full-sized avatar
🎯
Stay focused

Bi Yoo biyootiful

🎯
Stay focused
  • United States
View GitHub Profile
@biyootiful
biyootiful / NumDrills.txt
Last active August 22, 2017 19:18
Drills
//areaCompute
https://repl.it/G9Do/384
// celsFahrConverter
https://repl.it/G9EI/455
//divisible
https://repl.it/KSq3/0
export default class App extends Component {
constructor() {
super();
this.state = {
currentPage: "start"
};
this.handlePage = this.handlePage.bind(this);
}
handlePage(page) {
class StartPage extends Component {
render() {
return (
<TouchableHighlight onPress={() => this.props.handlePage("main")}>
<Text style={styles.text}>Go to the MainPage</Text>
</TouchableHighlight>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "black",
justifyContent: "center",
alignItems: "center"
},
text: {
color: "white",
fontSize: 25,
class FadeIn extends Component {
state = {
fadeAnim: new Animated.Value(0)
};
componentDidMount() {
Animated.timing(this.state.fadeAnim, {
toValue: 1,
duration: 2500
}).start();
class StartPage extends Component {
render() {
return (
<FadeIn>
<TouchableHighlight onPress={() => this.props.handlePage("main")}>
<Text style={styles.text}>Go to the MainPage</Text>
</TouchableHighlight>
</FadeIn>
);
}
class Pumpkin extends Component {
constructor() {
super();
this.spinValue = new Animated.Value(0);
}
componentDidMount() {
this.spin();
}
class Pumpkin extends Component {
constructor() {
super();
this.state = {
isPressed: true
};
this.springValue = new Animated.Value(0.3);
this.spinValue = new Animated.Value(0);
}
@biyootiful
biyootiful / rn-intro-router.js
Created November 2, 2017 20:16
react-native-intro-anim
export default class App extends Component {
state = {
currentScreen: "intro"
};
router(page) {
this.setState({ currentScreen: page });
}
renderScreen() {
class Intro extends Component {
state = {
springVal: new Animated.Value(0.8),
};
componentDidMount() {
setTimeout(() => this.spring(), 2000);
}
spring() {