Skip to content

Synchronous call of Modal dismissal and show alert not working in react native 0.60.0 #26196

@sumitkmgupta

Description

@sumitkmgupta

React Native version:

Steps To Reproduce

  1. Created a modal of loader and show when API call.
  2. 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())
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    API: AlertBugComponent: ModalStaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions