packages/petiole/src/actionCreatorBuilders.js
function buildFromArray({ declaration, name, mapActionType }) {
  if (Array.isArray(declaration)) {
    return (...args) => declaration.reduce(
      (result, key, index) => Object.assign(
        result,
        { [key]: args[index] }
      ),
      { type: mapActionType(name) }
    );
  }
  return null;
}
function buildFromArray({ declaration, name, mapActionType }) {
  if (Array.isArray(declaration)) {
    return (...args) => declaration.reduce(
      (result, key, index) => Object.assign(
        result,
        { [key]: args[index] }
      ),
      { type: mapActionType(name) }
    );
  }
  return null;
}
function buildFromArray ( { declaration , name , mapActionType } ) { if ( Array . isArray ( declaration ) ) { return ( ... args ) => declaration . reduce ( ( result , key , index ) => Object . assign ( result , { [ key ] : args [ index ] } ) , { type : mapActionType ( name ) } ) ; } return null ; }
Arrays -> simple action creators with multiple arguments
Arrays - > simple action creators with multiple arguments