timolins / react-hot-toast

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

Custom toast flicker before leaving with custom animation #206

Closed naveenkash closed 2 years ago

naveenkash commented 2 years ago

I'm having a issue with custom toast i added the animation but before leaving it flicker and come back to enter animation. here's the sandbox - https://codesandbox.io/s/sleepy-galois-bdhw3m?file=/src/App.js

timolins commented 2 years ago

Duplicate of #165.

Try adding forwards keyword to your exit animation, which preserves the final state (which is hidden). Otherwise it will jump back to the initial state after the animation ended.

naveenkash commented 2 years ago

Thank you It fixed the issue