Created
October 13, 2021 10:20
-
-
Save yarigpopov/26f18319596bf6225d21c317e415b47c 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
export function useDogProviderState() { | |
const context = React.useContext(DogDataProviderContext); | |
if (context === undefined) { | |
throw new Error('useDogProviderState must be used within DogDataProvider.'); | |
} | |
return context; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment