magicismight / react-native-root-toast

react native toast like component, pure javascript solution
MIT License
2.05k stars 404 forks source link

Toast disappears as soon as appears #138

Open Yandamuri opened 3 years ago

Yandamuri commented 3 years ago

This is my Toast configuration

  Toast.show(toastComponent, {
    duration: Toast.durations.LONG,
    position: -99, 
    shadow: false,
    animation: true,
    hideOnPress: true,
    delay: 0,
    backgroundColor: Colors.APP_BACKGROUND
});

As per documentation Toast.durations.LONG means 3500(I ma not sure if it is milliseconds). But in my case Toast disappears as soon as appears. IF I give value 5000then it remains up to 2 seconds.

  1. Duration is milliseconds or not?
  2. IF it is milliseconds why toast disappears immediately when duration is Toast.durations.LONG(3500)
shadowgroundz commented 3 years ago

+1

clemi-mage-me commented 2 months ago

I had better result after settings the duration param to an absurde number like 1000000000 Since the used time unit is not provided in the documentation i guess it uses nanoseconds ?