elfi
elfi copied to clipboard
Passing props to mapStateToProps
It could be great to access to props given to Component via connect().
like:
export default injectIntl(
withRouter(
connect(TextPage, (state, store, props) => ({
storeBill: state.bills.bydId[props.match.params.id],
})),
),
)
for that, in elfi/react.js -> connect(), we should change from:
const propsFromStore = mapStateToProps(store.getState(), store)
to:
const propsFromStore = mapStateToProps(store.getState(), store, this.props)
what do you think?
The idea is interesting yes, lemme check how it impacts the code base and/or if we should do something more :)