timolins / react-hot-toast

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

Infinite duration does not work, toasts dismiss instantly #79

Closed garand closed 3 years ago

garand commented 3 years ago

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

garand commented 3 years ago

Ah, it looks like there hasn't been a new version published since that. That would probably be why.

ghost commented 3 years ago

@timolins Will we get a new release with this fix soon? :pray:

timolins commented 3 years ago

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.

timolins commented 3 years ago

Fix is out now with 2.0.0!

shubham-mcsam commented 2 years ago

The exact same issue of is occurring in 2.2.0

timolins commented 2 years ago

@shubham-mcsam Can you share an example that reproduces this issue?

shubham-mcsam commented 2 years ago

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