react-native-toast-message icon indicating copy to clipboard operation
react-native-toast-message copied to clipboard

It is strongly required that each toast can use a separate instance to show or hide

Open RocCaiy23 opened this issue 3 years ago • 3 comments

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?

RocCaiy23 avatar Jun 14 '22 02:06 RocCaiy23

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 avatar Jul 13 '22 16:07 ntrabue

@ntrabue how to do target which one to open please ?

alainib avatar Nov 08 '23 08:11 alainib

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.

landabaso avatar Jan 07 '24 12:01 landabaso