There is a way to call a props function (which is passed by the parent component, not in the current component), in saga container after a specific request?
This is my example
saga.js
export function* getItem(options) {
try {
const url = `....`;
const response = yield call(request, url);
// here setResponse is an action that modify reducer and it's fine
yield put(setResponse(response));
// here I want to put a props parents function(something like this), but in sagas I dont't have access to props
yield put(this.props.parentFunction)
} catch (e) {
.....
}
}
The only way I found is to use a callback(so I call the props to function in index.js and exist) or pass directly the function as getItems options.
There is a cleaner way?