Skip to content

Latest commit

 

History

History
19 lines (11 loc) · 504 Bytes

namespacedAction.md

File metadata and controls

19 lines (11 loc) · 504 Bytes

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' })