React Native version:
Steps To Reproduce
- Created a modal of loader and show when API call.
- When response get by api sent a callback to show alert and tried to dismissed the loader modal.
I switched the case with dismissed the loader first after the show alert via call but again it's not working.
Sometime any of case working as well.
Modal not getting dismissed after cmd+r also.
Alert should be shown and loader and dismiss the loader.:
sendPOSTHttpRequest(url, payload).then (res =>{
console.log('Response: ', res)
if (res.success){
let otp = res.payload.otp
dispatch({
type: GENERATE_OTP,
mobileNumber: mobile,
countryCode: countryCode,
otp: otp,
success: true
})
callback(true, '')
}else{
callback(false, 'Something went wrong')
}
dispatch(hideLoader())
})
React Native version:
Steps To Reproduce
I switched the case with dismissed the loader first after the show alert via call but again it's not working.
Sometime any of case working as well.
Modal not getting dismissed after cmd+r also.
Alert should be shown and loader and dismiss the loader.:
sendPOSTHttpRequest(url, payload).then (res =>{
console.log('Response: ', res)
if (res.success){
let otp = res.payload.otp
dispatch({
type: GENERATE_OTP,
mobileNumber: mobile,
countryCode: countryCode,
otp: otp,
success: true
})
callback(true, '')
}else{
callback(false, 'Something went wrong')
}
dispatch(hideLoader())
})