我在 Redux 传奇中有以下代码:
function* providersList(action) {
yield put(LoadingActionCreators.start(Actions.PROVIDERS_LIST));
yield put(ErrorActionCreators.clear(Actions.PROVIDERS_LIST));
try {
const response = yield call(
PostRequest,
'providers/list',
{
AuthorizationKey: authorizationKey,
CustomerID: action.customerID
}
);
if (response.Message === "Success")
yield put(ProvidersActionCreators.providersListSuccess(response.Providers))
else
yield put(ErrorActionCreators.set(Actions.PROVIDERS_LIST, new Error('PROVIDERS_LIST ERROR')));
} catch (error) {
yield put(ErrorActionCreators.set(Actions.PROVIDERS_LIST, error));
}
yield put(LoadingActionCreators.end(Actions.PROVIDERS_LIST));
}
我正在使用 React Native 调试器,并且想在该if (response.Message === "Success")
行放置一个断点。调试器不会让我这样做。如果我单击将断点放在那里,它会将它放在上面的 line 处function* providersList(action)
。
谁能帮我理解这是为什么?