Closed durdevic closed 4 years ago
Thanks for the info @durdevic. Merging into https://github.com/cooperka/react-native-snackbar/issues/28.
Please try the setTimeout
workaround so the snackbar doesn't get attached to the view that's being closed.
I have the exact same issue on desktop:
let snackConfig : MatSnackBarConfig = {
duration: 3000
}
this.snackbarRef = this.snackbar.open("Setting signature successful", "foo", snackConfig)
it appears for a brief millisecond and disappears again immediately.
I thought this was a fix for it but still occurs. https://github.com/cooperka/react-native-snackbar/pull/155
So I'm showing the Snack once the closeModal (made from react-native-modal component) is triggered.
On Android it gets shown for a split second and then dismissed. I thought it was because of re-rendering, but when I moved it to other component, it's the same behaviour. I also tried LENGTH_INDEFINITE, still no luck.
Is there a special way to tackle it with Modals on Android?
I also tried extracting the function and triggering it outside of the return section, still an issue.
On iOS it works smoothly.