magicismight / react-native-root-toast

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

Toast is not rendering inside api call response #139

Open Yandamuri opened 3 years ago

Yandamuri commented 3 years ago

Let's say following is my api call

axios(`https://smapleapicall.com`).then(repsonse => {
     toast('toast inside api call response');
})

Toast message is not rendering If I call toast inside a api call response. But If I call as shown below outside api call response it's works well

axios(https://smapleapicall.com).then(repsonse => {

})

toast('toast outside api call');

Can someone help me to avoid this error?

"react-native-root-toast": "3.2.1" "react-native": "0.63.2"

sunnylqm commented 3 years ago

First please make sure the request goes well without exception. Could you try replacing toast with alert to see if it's really invoked in then?

Yandamuri commented 3 years ago

@sunnylqm except toast message, what ever I do inside api call response, executing well with out any failure.

SiSa68 commented 3 years ago

Same here..

shadowgroundz commented 3 years ago

Have you install react-native-root-siblings? I already install and config. Toast show in my response API. But close very fast (maybe 1s). I already set to 10.000ms but not effect