-
Notifications
You must be signed in to change notification settings - Fork 280
Description
Describe the bug
In my app, I need to display several toast messages sequentially. However, I’ve encountered an issue specifically on Android where one or more of the toast components occasionally fail to unmount as expected. As a result, the toast remains stuck on the screen, even after its display duration has passed. This doesn’t seem to happen consistently and is hard to reproduce reliably, but it affects the user interface and can lead to a poor user experience. I suspect the issue might be related to how the toast lifecycle is handled internally.
Steps to reproduce
Steps to reproduce the behavior:
- Show a few toasts one after another;
- Use the element inspector to observe that one of the toast components does not unmount properly.
Expected behavior
All displayed toasts should be properly unmounted and no longer visible on the screen.
Video record
https://github.com/user-attachments/assets/57a91d55-4566-4510-8efc-5f380a4bcfff
Environment
- OS: Android (API 33+)
- react-native-toast-message version: v2.3.3
- react-native version v0.75.4