Created
July 16, 2023 08:21
-
-
Save ms314006/901e6b7da2ee981a52d3d2d66e43ffa6 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
const useUserProfile = (userId) => useQuery({ | |
queryKey: ['user'], | |
queryFn: async () => { | |
const userProfile = await fetchUserProfile(); | |
return new User(userProfile); | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment