I hereby claim:
- I am alanmynah on github.
 - I am alanmynah (https://keybase.io/alanmynah) on keybase.
 - I have a public key ASDHHq3d9fkonWjdKiV3565JPqc3IK6UteApHslJjKjGPAo
 
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
| <title>Activity Voter</title> | |
| <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> | 
| <html> | |
| <head> | |
| <script src="https://unpkg.com/react@16/umd/react.development.js"></script> | |
| <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> | |
| <script src="https://unpkg.com/[email protected]/babel.min.js"></script> | |
| <style> | |
| /* | |
| PASTE CSS HERE (Optional) | |
| */ | |
| </style> | 
| import React, { useState, useEffect } from "react"; | |
| import ReactDOM from "react-dom"; | |
| import "./styles.css"; | |
| const getData = async (search) => { | |
| const proxyurl = "https://cors-anywhere.herokuapp.com/"; | |
| const url = `http://www.recipepuppy.com/api/?q=${search}`; | |
| const response = await fetch(proxyurl + url).catch(() => | 
| import React from 'react' | |
| const Color = React.memo(function Color(props) { | |
| console.log('Color component rendered') | |
| return ( | |
| <div> | |
| <button onClick={props.handleChange}>🖍️</button> | |
| <h3>{props.color}</h3> | |
| </div> | |
| ) | 
| import { useState } from 'react' // All hooks are named imports | |
| import randomColor from 'randomcolor' // Just a helper function | |
| function App(props) { | |
| const [color, setColor] = useState('#fff') | |
| return ( | |
| <div> | |
| <Color handleChange={() => setColor(randomColor())} /> | |
| </div> | |
| ) | |
| } | 
| import React from 'react' | |
| export default function Letter(props) { | |
| return ( | |
| <div> | |
| <button onClick={props.handleChange}>✏️</button> | |
| <h3>{props.letter}</h3> | |
| </div> | |
| ) | |
| } | 
| import React from 'react' | |
| export default function Color(props) { | |
| // console.log('Color component rendered') | |
| return ( | |
| <div> | |
| <button onClick={props.handleChange}>🖍️</button> | |
| <h3>{props.color}</h3> | |
| </div> | |
| ) | 
| import React, {useState, useMemo} from 'react' | |
| import ReactDOM from 'react-dom' | |
| import Color from './Color' | |
| import Letter from './Letter' | |
| import randomColor from 'randomcolor' | |
| import randomLetter from 'random-letter' | |
| function App(props) { | |
| const [color, setColor] = useState('#fff') | |
| const [letter, setLetter] = useState('a') | 
| function longestCollatzSequence(limit) { | |
| let longestSequenceLength = 0; | |
| let startingNum = 0; | |
| const getSequenceLength = num => { | |
| let sequence = [num]; | |
| while (num > 1) { | |
| if (num % 2 === 0) { | |
| num = num / 2; |