namespacedAction(namespace)

A higher-order action that adds the provided namespace to the action.

Arguments

  1. namespace (string): The namespace to apply to the action.

Returns

(Function): A function that accepts an action and returns a new action that is identical to the original except with the namespace applied.

Examples

import { namespacedAction } from 'redux-subspace'

const action = namespacedAction('subApp')({ type: 'MY_ACTION', value: 'example' })

results matching ""

    No results matching ""