What is the proper way of connecting multiple states with corresponding action creators in Redux?
Is that even a good idea?
How can I work around that if it's a stupid idea?
export default connect(
// which part of the Redux global state does
// our component want to receive as props?
(state) => {
return {
state: state.instagram
};
},
// which action creators does
// it want to receive by props?
(dispatch) => {
return {
actions: bindActionCreators(instagramActions, dispatch)
};
}
)(FeedContainer);
What I basically want is something like this:
...
state: {state.instagram, state.facebook}
...
...
const mergedActions = {instagramActions, facebookActions};
actions: bindActionCreators(mergedActions , dispatch)
...