Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 463 Bytes

namespaced.md

File metadata and controls

20 lines (12 loc) · 463 Bytes

namespaced(namespace)

A higher-order reducer that filters out actions that do not match the provided namespace.

Arguments

  1. namespace (string): The namespace of the reducer.

Returns

(Function): A function that accepts a reducer and returns reducer that wraps the provided one.

Examples

import { namespaced } from 'redux-subspace'
import reducer from 'somewhere'

const namespacedReducer = namespace('subApp')(reducer)