Right now we don't return anything from the dispatch function, and as I understand, unless we return special type of object, no middleware will change it.
So, the idea is to actually return values, and not only internal values (like payload), but also the same interface as in selectors, so it will allow to avoid cumbersome constructions like in the README.md:
// login user
await dispatch(actions.tiles.user.authRequest(params));
// check the result
const { data: { id }, error } = selectors.tiles.user.authRequest(getState());
Right now we don't return anything from the dispatch function, and as I understand, unless we return special type of object, no middleware will change it.
So, the idea is to actually return values, and not only internal values (like
payload
), but also the same interface as in selectors, so it will allow to avoid cumbersome constructions like in the README.md:We can just write more elegantly: