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 { useEffect, useState } from 'react'; | |
export const useFetch = url => { | |
const [info, setInfo] = useState({ data: null, loading: true }); | |
useEffect(() => { | |
setInfo({ data: null, loading: true }); | |
fetch(url) | |
.then(x => x.text()) | |
.then(y => { |
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
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" | |
integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous"> |
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
Caps+fn+p (6 secs) = Capital Key RGB Independance | |
fn + K + C -> Disable brightness buttons to allow F5 and F6 Func |
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
npx create-react-app <app_name> --typescript |
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
https://corona.lmao.ninja/v2/countries [all] | |
axios.get(`https://corona.lmao.ninja/v2/countries/${countryName}`) [Query By Country] | |
eg -> https://corona.lmao.ninja/v2/countries/south%20africa |
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
Show hidden characters
{ | |
"presets": ["@babel/preset-env"] | |
} |
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
{ | |
"name": "chapter-19", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"build": "node_modules/.bin/webpack --mode production", | |
"serve": "webpack-dev-server --mode development" | |
}, | |
"author": "", |
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
const users = [ | |
{ name: 'mario', premium: true }, | |
{ name: 'luigi', premium: false }, | |
{ name: 'yoshi', premium: true }, | |
{ name: 'toad', premium: true }, | |
{ name: 'peach', premium: false }, | |
]; | |
export const getPremUsers = (users) => { | |
return users.filter((user) => { |
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
# list all commits made across different branches on the repo | |
git log | |
# list all branches (will also show which branch you are currently on) | |
git branch | |
# switch to a branch | |
git checkout <existing_branch_name> | |
# create new branch |
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 '../styles/global.css'; | |
export default function App({ Component, pageProps }) { | |
return <Component {...pageProps} />; | |
} |