Created
January 29, 2023 06:17
-
-
Save ms314006/224a4a9915358f815d34fa8413559add 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
import { useQuery } from 'react-query'; | |
import apis from '../apis'; | |
const useUser = () => useQuery( | |
['user'], | |
async () => { | |
const { data: user } = await apis.getUser(); | |
return user; | |
} | |
); | |
export default useUser; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment