¿Por qué tenemos => dos veces. No se puede entender la declaración de la función de flecha.
const asyncFunctionMiddleware = storeAPI => next => action => { // If the "action" is actually a function instead... if (typeof action === 'function') { // then call the function and pass `dispatch` and `getState` as arguments return action(storeAPI.dispatch, storeAPI.getState) } // Otherwise, it's a normal action - send it onwards return next(action) }asyncFunctionMiddleware toma un argumento storeAPI y devuelve una función sin nombre. Esta función sin nombre toma un argumento a next y devuelve otra función sin nombre. Esta función sin nombre toma una action de argumento y devuelve un valor.