Created
April 14, 2019 20:47
-
-
Save YKalashnikov/15edc9f4ba427b4d0ad3ba608fced3f6 to your computer and use it in GitHub Desktop.
This file contains 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
// 🐢 custom hook - name starts with "use" (useMedium) | |
useMedium(() => { | |
const URI = "https://some-path-api"; | |
// 🦄 custom hook can use any of the default | |
// React hooks - this is NOT compulsory. | |
useEffect(() => { | |
fetch(URI) | |
},[]) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment