timolins / react-hot-toast

Smoking Hot React Notifications 🔥
https://react-hot-toast.com
MIT License
9.84k stars 331 forks source link

Use react hot toast promise without success message #264

Closed manojgetwealthy closed 1 year ago

manojgetwealthy commented 1 year ago

There is no way to use react hot toast with a promise that should not show any success message but only show error message or loading message.

Tried following but typescript gives error:

```

toast.promise(promise, { loading: 'Uploading doc..', error: 'Error uploading documents. Please try again after sometime' });



Note: React host toast is awesome by the way.
n33pm commented 1 year ago

179

rcbevans commented 1 year ago

Came to look for this, but for without error message (I want promise to be cancellable and in that case, skip an error toast)

timolins commented 1 year ago

Duplicate of #42