Skip to content

Instantly share code, notes, and snippets.

View edtoken's full-sized avatar

Eduard Titov edtoken

View GitHub Profile
@edtoken
edtoken / actions.js
Created October 11, 2017 11:14 — forked from Bitaru/actions.js
redux-shelf
import { createAction } from 'redux-actions';
import { identity, isArray } from 'lodash';
import { SubmissionError } from 'redux-form';
export const PREFIX = '@@shelf';
export const statuses = ['START', 'SUCCESS', 'ERROR'];
const getType = (status:string) => (name):string => `${PREFIX}/${status} -> ${name.toString()}`
const createApiAction = (name, status) => createAction(