I'm using redux saga as middleware and call my request in this layer. When enable react-native debugger request works prefect, but without the debugger it seems request is not async anymore.
export function* userLoginSaga(action) {
yield put(actions.userLoginStart());
const response = yield GET(`${action.server}`, {
'Content-Type': 'application/json'
}, {
username: action.username,
password: action.password
});
if (response === 503) {
yield put(actions.serverErrorSuccess(response))
} else if (response.status === 200) {
yield put(actions.userLoginSuccess(response.data));
}
}
without react debugger, i get "undefined is not an object (response.status) ". It's not waiting for response to get the result. Please note that everything is working fine with debugger.