Gets the middleware function that transforms arguments passed to this function into the action payload.
Not every action creator has a middleware function; in such cases the first argument is treated as the action payload.
async is true, the middlware function returns a promise whose value eventually becomes
the action payload. Otherwise, the return value is the payload itself.