Skip to content

Latest commit

 

History

History
 
 

redux-dynostore-react-redux-subspace

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

@redux-dynostore/react-redux-subspace

build status npm version npm downloads License: BSD-3-Clause

Enhancer for mounting React components within subspaces when using redux-dynostore.

Usage

import dynamic from '@redux-dynostore/react-redux'
import subspaced from '@redux-dynostore/react-redux-subspace'

export default dynamic('identifier', subspaced())(MyComponent)

With extra state

export default dynamic('identifier', subspaced({ mapExtraState: (state, rootState) => ({ /* ... */ }) }))(MyComponent)

When mounted, MyComponent will be wrapped in a SubspaceProvider.

If you are attaching a reducer dynamically, you should use the redux-subspace variant to ensure it will receive the namespaced actions.