react-redux-remote
v1.1.0
Published
Listen to state changes in react-redux connected components
Downloads
1
Readme
react-redux-remote
Hook into the componentDidMount
and componentWillReceiveProps
stages of the React component lifecycle,
extracting props
as managed by the selector
of a react-redux
connect()
'ed component.
import remote from 'react-redux-remote'
const UserTable = ({users}) => ( ... )
function mapStateToProps(...) { ... }
function mapPropsToDependencies(...) { ... }
const ConnectedUserTable = connect(mapStateToProps)(UserTable)
const RemoteConnectedUserTable = remote(mapPropsToDependencies, ensureDependency)(ConnectedUserTable)
export default RemoteConnectedUserTable
Kind of like react-refetch
, but keeps redux
in the loop.
Install
npm install --save react-redux-remote
References
License
Copyright (c) 2017 Christopher Brown. MIT Licensed.