Created
July 21, 2021 12:51
-
-
Save DZuz14/90545cbbb05642ffa38c9ad6da6faf69 to your computer and use it in GitHub Desktop.
Tornado Chart App Skeleton
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, { | |
useEffect, | |
useState | |
} from "https://cdn.skypack.dev/[email protected]"; | |
import ReactDOM from "https://cdn.skypack.dev/[email protected]"; | |
import axios from "https://cdn.skypack.dev/[email protected]"; | |
const App = () => { | |
const [stats, setStats] = useState([]); | |
const fetchStats = async () => { | |
const res = await axios.get("https://tinyurl.com/2pa553ap"); | |
setStats(res.data); | |
}; | |
useEffect(() => { | |
fetchStats(); | |
}, []); | |
return <div></div>; | |
}; | |
ReactDOM.render(<App />, document.querySelector(".app")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment