Reputation: 661
I have Material-ui and redux all set up in and working, however redux has you use connect with higher order components:
export default connect(mapStateToProps)(ComponentName);
while the Material-ui documentation has you do something similar:
export default muiThemeable()(ComponentName);
How would you combine the theme with the redux export to get them to export or work together?
Upvotes: 2
Views: 712
Reputation: 7567
You can compose multiple Higher Order Components:
export default muiThemeable()(connect(mapStateToProps)(ComponentName));
An HOC takes a component (and possibly other arguments) and returns another component. So, the return value of an HOC is a valid argument for another HOC.
Upvotes: 2