react-redux-remote

1.1.0 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i react-redux-remote

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • chbrown