-
-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
toast.show is not a function (it is undefined)] #190
Labels
bug
Something isn't working
Comments
I got the same problem~ |
I am getting the same issue is there any specific reason for this or update on this issue? |
you are calling toast before it is loaded. Use it like this
|
Can you fixed this bug |
toast must be called after initial render of application. i.e inside a useEffect(() => toast.show(), []) |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
import { useToast } from "react-native-toast-notifications";
export default function Toast() {
const toast = useToast();
toast.show("Hello World");
}
Current behaviour
LOG error [TypeError: toast.show is not a function (it is undefined)]
Expected behaviour
Show Toast Notification
Code sample
For Syntax Highlighting check this link
Screenshots (if applicable)
What have you tried
Your Environment
The text was updated successfully, but these errors were encountered: