Skip to content

Instantly share code, notes, and snippets.

@ryanjyost
Created March 19, 2020 01:16
Show Gist options
  • Save ryanjyost/47ee7dcc2d1f4a035382365e217d68fe to your computer and use it in GitHub Desktop.
Save ryanjyost/47ee7dcc2d1f4a035382365e217d68fe to your computer and use it in GitHub Desktop.
App with logs
//... same above
function App() {
const [loaded, setLoaded] = useState(false);
useEffect(() => {
console.log("This is a log");
console.warn("This is a warning");
console.error("This is an error");
const secondsToWait = 1;
axios(`https://httpstat.us/200?sleep=${secondsToWait * 1000}`).then(
response => {
setLoaded(true);
}
);
}, []);
//... same below
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment