Operations

There are several built-in actions:

To use those just import ACTIONS object:

import { ACTIONS } from 'general-reducer';

// or

import { createGeneralReducer } from 'general-reducer';

const { ACTIONS } = createGeneralReducer(...);

...

dispatch(ACTIONS.set(...));

If by some reason you need action type constants, they are available as well:

import { TYPES } from 'general-reducer';

// or

import { createGeneralReducer } from 'general-reducer';

const { TYPES } = createGeneralReducer(...);

...

dispatch({ type: TYPES.set, payload: ... });

results matching ""

    No results matching ""