In react I'm trying to export a class called IconButtons, the current export I have is this:
export default withStyles(styles)(IconButtons);
This works great, but decided my app needed Redux, so I need to add the Connect wrapper function. I tried the following code:
const iconExports = {
reduxConnect() { connect(mapStateToProps)(IconButtons) },
stylesExport() { withStyles(styles)(IconButtons)}
}
export default iconExports;
This gives me an error:
type is invalid -- expected a string (for built-in components) or a
class/function (for composite components) but got: object.
How do I use both of these functions for one export?
export default connect(mapStateToProps)(withStyles(styles)(IconButtons));reduxConnect() { return connect(...andstylesExport() { return with...