Skip to content

tugorez/redux-actions

Repository files navigation

redux-actions

Codeship Status for spaceship-labs/seeus codecov

Based on the awesome project redux-actions

Why another redux-actions package ?

Actually I just wrap a single function: createActions which now only receives an arbitrary number of string literals and supports their type to be prefixed

const prefix = 'some_random_prefix';
const types = [
  'SOME_RANDOM_TYPE_1', 
  'SOME_RANDOM_TYPE_2',
  'SOME_RANDOM_TYPE_3',
];
const {
  someRandomType1,
  someRandomType2,
  someRandomType3,
} = createActions(prefix, types);
expect(someRandomType1().type).toEqual(`${prefix}/${type1}`);
expect(someRandomType2().type).toEqual(`${prefix}/${type2}`);
expect(someRandomType3().type).toEqual(`${prefix}/${type3}`);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published