<Toaster /> duration prop not changing duration of the notification
See original GitHub issueGiving your nice react-hot-toast npm a run in a project I’m working on. We have a simplistic alerts system and just today started looking at libs to upgrade our UI. Trying yours out after reading a blurb from a @tylermcginnis newsletter.
We literally copied this code from your <Toaster /> API page and tweaked the duration really long to 30 seconds (30000) while testing some other things but the duration doesn’t seem to be honored:
<Toaster
position="top-center"
reverseOrder={false}
toastOptions={{
// Define default options
style: {
margin: '40px',
background: '#363636',
color: '#fff',
zIndex: 1,
},
duration: 5000,
// Default options for specific types
success: {
duration: 3000,
theme: {
primary: 'green',
secondary: 'black',
},
},
}}
/>
We will keep playing around with it and let you know if we determine it is something in our code.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Notification like Toast but with longer duration - Stack Overflow
I have to create a notification like an android toast notification but I need to throw it from a service and I need...
Read more >GitHub - jossmac/react-toast-notifications
ToastProvider Props Default 5000 . The time until a toast will be dismissed automatically, in milliseconds. Default: false . Whether or not to...
Read more >toast() API
Creates a custom notification with JSX without default styles. ... Every type has its own duration. You can overwrite them duration with the...
Read more >Toast - .NET MAUI Community Toolkit - Microsoft Learn
Toast is a timed alert that appears at the bottom of the screen. It is automatically dismissed after a configurable duration of time....
Read more >Toast | Android Developers
public static final int LENGTH_SHORT. Show the view or text notification for a short period of time. This time could be user-definable. This...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Chiming in here to say I love this lib @timolins. Just added it to our project (replacing react-toastify) and it’s a joy to work with. Great job.
Just published
v1.0.1
which addresses this issue. Let me know if that worked for you!