Last active
August 16, 2020 18:36
-
-
Save simicd/dfe42d237348ea718673103de6bcad21 to your computer and use it in GitHub Desktop.
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
| // useFetch.ts | |
| // .. | |
| export const useFetch = ({ url, init }: RequestProps) => { | |
| // Response state | |
| // .. | |
| useEffect(() => { | |
| // ... | |
| }, [JSON.stringify(url), JSON.stringify(init)]); | |
| return data; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment