Created
January 12, 2020 21:15
-
-
Save aibolik/86557138e7920d7f38aa7eba74b1b627 to your computer and use it in GitHub Desktop.
useToast hook (part of post https://aibolik.github.io/blog/creating-toast-api-with-react-hooks)
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
export function useToast() { | |
const toastHelpers = React.useContext(ToastContext); | |
return toastHelpers; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment