async-conncect
Install
yarn add async-conncect
Usage
import { compose } from 'recompact'
import asyncConnect from 'async-conncect'
import { connect } from 'react-redux'
const enhance = compose(
asyncConnect([
{
type: '@@my-app/getUser',
action: getUser,
payload: {
id: 123
}
},
{
type: '@@my-app/getOtherThing',
action: getOtherThing,
payload: {
id: 456
}
}
]),
connect(({ user }) => ({ user }))
)
export default enhance(props => props.user.name
Contributing
Contributions welcome! Please read the contributing guidelines first.
License
ISC