How to use the redux-actions.handleAction 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 flow-typed / flow-typed / definitions / npm / redux-actions_v2.x.x / flow_v0.34.x-v0.38.x / test_handleAction.js View on Github external
function test_handleAction() {
  const reducer = handleAction(INCREMENT, (state, action: ActionType) => {
    assert(action.payload, (x: number) => {})

    // $ExpectError
    assert(action.payload, (x: string) => {})
  }, initState)
}
github flow-typed / flow-typed / definitions / npm / redux-actions_v2.x.x / flow_v0.39.x- / test_handleAction.js View on Github external
function test_handleAction() {
  const reducer = handleAction(INCREMENT, (state, action: ActionType) => {
    assert(action.payload, (x: number) => {})

    // $ExpectError
    assert(action.payload, (x: string) => {})
  }, initState)
}
github shastajs / shasta / src / lib / createReducer.js View on Github external
const reducers = filter(mapValues(o, (v, k) => {
    if (k === 'initialState') return
    const name = parentName ? `${parentName}.${k}` : k

    if (isFunction(v)) {
      hadReducers = true
      return handleAction(name, v)
    }

    if (typeof v === 'object') {
      return createReducer(v, name)
    }
  }), isFunction)

redux-actions

Flux Standard Action utlities for Redux

MIT
Latest version published 1 year ago

Package Health Score

65 / 100
Full package analysis