This file contains hidden or 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
// What's the difference? | |
const sayHello = name => console.log(name) | |
function sayHello(name) { | |
console.log(`${name}`) | |
} |
This file contains hidden or 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
// make this work | |
duplicate([1,2,3,4,5]); // [1,2,3,4,5,1,2,3,4,5] |
This file contains hidden or 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
import React, { useState } from "react"; | |
import { motion } from "framer-motion"; | |
const styles = { | |
borderRadius: 30, | |
width: 100, | |
height: 100, | |
margin: "auto", | |
display: "flex", | |
justifyContent: "center", |
This file contains hidden or 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
import React from "react"; | |
import { motion } from "framer-motion"; | |
const styles = { | |
background: "#7fffd4", | |
borderRadius: 30, | |
width: 150, | |
padding: "10px 20px", | |
margin: "auto", | |
color: "#333", |
This file contains hidden or 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
import React from "react"; | |
import { motion } from "framer-motion"; | |
const styles = { | |
background: "#035ee8", | |
borderRadius: 30, | |
width: 100, | |
height: 100, | |
margin: "auto" | |
}; |
This file contains hidden or 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
import React from "react"; | |
import { motion } from "framer-motion"; | |
const styles = { | |
background: "red", | |
borderRadius: 30, | |
width: 50, | |
height: 50, | |
margin: "auto" | |
}; |
This file contains hidden or 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
import React from "react"; | |
import { motion } from "framer-motion"; | |
const styles = { | |
background: "blue", | |
borderRadius: 30, | |
width: 150, | |
height: 150, | |
margin: "auto" | |
}; |
This file contains hidden or 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
import { motion } from "framer-motion" |
This file contains hidden or 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
render() { | |
return ( | |
<View style={styles.panel}> | |
<VrButton | |
onClick={this.incrementCount} | |
style={styles.greetingBox} | |
> | |
<Text>+</Text> | |
</VrButton> | |
<VrButton |
This file contains hidden or 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
export default class Hello360 extends React.Component { | |
state = { | |
count: 0, | |
}; | |
// This method increments our count, triggering a re-render | |
incrementCount = () => { | |
this.setState({count: this.state.count + 1}); | |
}; |