-
-
Notifications
You must be signed in to change notification settings - Fork 699
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
Add update toast type when toast.promise
resolves
#851
base: main
Are you sure you want to change the base?
Add update toast type when toast.promise
resolves
#851
Conversation
Hey @fkhadra. Could you look at this PR and tell me what you think? |
toast.promise
resolves
Hey @alexandredev3, as a graphql user I understand the need of adding such API. it can also be useful when using native fetch as it won't throw when the response is not ok. |
Hi @fkhadra! I don't fully understand why you're not sure if this should belong to the library. |
any updates on this? |
Now the
type
prop accepts a function and receives the data returned from the promise. It's similar to therender
prop.example:
There's no need to work around using
toast.update
anymore if the promise resolves with an error.resolves #819