How to use the redux-actions.createAction function in redux-actions

To help you get started, we’ve selected a few redux-actions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ShotaOd / carbon / carbon-sample-v2 / src / main / javascript / spa / src / base / navbar / action.js View on Github external
import { createAction } from 'redux-actions';

export const Action = {
  TOGGLE_MENU: 'TOGGLE_MENU',
};

const toggleMenu= createAction(Action.TOGGLE_MENU);

export function toggleMenuAction() {
  return dispatch => dispatch(toggleMenu());
}
github idekerlab / hiview / frontend / src / actions / message.js View on Github external
import { createAction } from 'redux-actions'

export const SET_MESSAGE = 'SET_MESSAGE'

export const setMessage = createAction(SET_MESSAGE)
github busyorg / busy / src / client / app / Notification / notificationActions.js View on Github external
import { createAction } from 'redux-actions';

export const SHOW_NOTIFICATION = 'SHOW_NOTIFICATION';

export const showNotification = createAction(SHOW_NOTIFICATION);

export const notify = (text, context) => dispatch => {
  dispatch(
    showNotification({
      text,
      context,
    }),
  );
};
github idekerlab / hiview / frontend / src / actions / filters.js View on Github external
import { createAction } from 'redux-actions'

export const ADD_FILTER = 'ADD_FILTER'
export const REMOVE_FILTER = 'REMOVE_FILTER'

export const ENABLE_FILTER = 'ENABLE_FILTER'


export const addFilter = createAction(ADD_FILTER)
export const removeFilter = createAction(REMOVE_FILTER)
export const enableFilter = createAction(ENABLE_FILTER)
github idekerlab / hiview / frontend / src / actions / filters.js View on Github external
import { createAction } from 'redux-actions'

export const ADD_FILTER = 'ADD_FILTER'
export const REMOVE_FILTER = 'REMOVE_FILTER'

export const ENABLE_FILTER = 'ENABLE_FILTER'


export const addFilter = createAction(ADD_FILTER)
export const removeFilter = createAction(REMOVE_FILTER)
export const enableFilter = createAction(ENABLE_FILTER)
github redux-definitions / redux-definitions / src / state / generators.js View on Github external
const generateFunction = (fn, namespacing, topLevel) => {
  if (topLevel) {
    throw Error('Redux Enterprise: State Type custom functions cannot be used at the reducer top level.')
  }

  const namespace = namespacing.join('/')

  return {
    action: createAction(namespace),
    reducers: {
      [namespace]: scopeReductionFactory(namespacing, true)(fn),
    },
  }
}
github wangtao0101 / resa / src / utils / action.js View on Github external
function createActionInner(type, payloadCreator, metaCreator) {
    return {
        pending: cAction(type + PENDING, payloadCreator, metaCreator),
        fulfilled: cAction(type + FULFILLED, payloadCreator, metaCreator),
    };
}
github svagi / redux-routines / src / index.js View on Github external
const createRoutineAction = stage => {
    const type = createActionType(prefix, stage, separator)
    return createAction(type, payloadCreator, metaCreator)
  }
  return stages.reduce((routine, stage) => {

redux-actions

Flux Standard Action utlities for Redux

MIT
Latest version published 1 year ago

Package Health Score

65 / 100
Full package analysis