react-native-toast-message
react-native-toast-message copied to clipboard
It is strongly required that each toast can use a separate instance to show or hide
I added a toast to each page. When switching pages after calling Toast.show() or Toast.hide() for a long time, it often acts on the toast of the previous page. This is a bug. solve?
Is there a reason you need a separate Toast component on every page? I have one Toast component in my App.tsx and one in my ModalScreen.tsx since they are on separate view layers but the Toast.show() args essentially give you infinite flexibility with regards to what is shown and how the toast looks.
@ntrabue how to do target which one to open please ?
I'd also like to have this. I use Toasts to display errors. I have a Toast component on the Root and another one in a Modal. The toast get's randomly rendered in the App when trying to show it in the Modal. I believe this happens when the Toast has been triggered and not dismissed in the App while the Modal is being mounted. It's difficult to know why this happens, may be another reason.