/**
 * Return an array of function of the form x => { type, payload = x }
 */
export function createActions(...types) {
  return types.map(createAction)
}

/**
 * Create a single action of the form x => { type, payload = x }
 */
export function createAction(type) {
  return (payload, error) => (Object.assign({ type }, payload ? { payload } : {}, error ? { error } : {}))
}

@@ -364,12 +364,540 @@
  %7D : %7B%7D))%0A%7D%0A
+%0A/**%0A * Create a single action of the form x =%3E %7B type %7D%0A * Use this for actions that do not carry any payload, this is useful especially if the action is%0A * going to be used as an event handler to avoid accidentally including the DOM event as payload.%0A */%0Aexport function createAction0(type) %7B%0A  return () =%3E (%7B type %7D)%0A%7D%0A%0A/**%0A * Return an array of action creators.%0A * Use this for actions that do not carry any payload.%0A * %0A * @returns %7BArray%7D%0A */%0Aexport function creactActions0(...types) %7B%0A  return types.map(createAction0)%0A%7D

Add createAction0 method for action without payload