question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Infinite duration does not work, toasts dismiss instantly

See original GitHub issue

Hey! I saw this PR https://github.com/timolins/react-hot-toast/pull/37 and tried out a duration of Infinity, but it is just causing the toast to dismiss instantly.

I’ve put together a CodeSandbox that reproduces the behavior. Any ideas?

https://codesandbox.io/s/pedantic-framework-c3v0x?file=/src/App.js

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
timolinscommented, May 28, 2021

You can try out react-hot-toast@2.0.0-beta.0 which includes this fix 😃 Will be publicly released after I gather some feedback.

0reactions
shubham-mcsamcommented, Apr 18, 2022

@timolins My bad, it’s working as expected. I was writing Infinity as a string! Thanks for your work on the library

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom toast breaks infinite duration · Issue #171 - GitHub
Even if I manually specify duration in the success toast's options, it still doesn't work. The only workaround I've managed is using toast....
Read more >
Can an Android Toast be longer than Toast.LENGTH_LONG?
Calling show() doesn't break anything if the Toast is already showing, but it does refresh the amount of time it stays on the...
Read more >
toast() API
You can manually dismiss a notification with toast.dismiss . Be aware that it triggers the exit animation and does not remove the Toast...
Read more >
ion-toast Component: A Dismissible App Notification Alert
The toast can be dismissed automatically after a specific amount of time by passing the number of milliseconds to display it in the...
Read more >
Configuring options in Vue Toast component - Syncfusion
By default, the showCloseButton is not enabled. You can enable it by setting the true value. Before expiring the toast, you can use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found