rnheroes / react-native-toastable

🍞 Blazingly fast and fully customizable Toaster component for React Native
https://www.npmjs.com/package/react-native-toastable
MIT License
91 stars 4 forks source link

Show Multiple instances of Toast or reuse toast instance and reset timer duration to hide #9

Closed luke92 closed 6 months ago

luke92 commented 6 months ago

Hi!

Is there any way to show multiple instances of Toast? https://github.com/kubilaysalih/react-native-customizable-toast Something similar to this package.

The reason it's because i click in one button to show the toast, and after that i click another button before the toast dissapears. After that, user needs to wait that the first toast dissapears to show the second one.

Another alternative that I have for the project I am working on is that the first toast that I show changes its content depending on the button that the second toast shows. Let's say that the toast timer is reset when you want to show the second toast, but that 2 queued instances are not created, but only one remains.

Do you think there is a way to do one and/or the other option?

Thank you, Greetings,

enestatli commented 6 months ago

Hello, currently it's in our TODO list but unfortunately not supporting right now. It would be nice.

Not sure but as a workaround you might use the hideToastable just after call the first one. This function removes the latest item on the queue.

Please let us know if that works for you, thanks.

luke92 commented 6 months ago

Many thanks! That works.