Sử dụng connect && withStyles cùng lúc (ok)

https://stackoverflow.com/questions/45704681/react-material-ui-export-multiple-higher-order-components

Ví dụ: Nếu có 2 export sau thì ta phải kết nối như nào???
import { withStyles } from '@material-ui/core/styles';
import {connect} from 'react-redux';
var mapStateToProps = (state) => {
	return {
		states: state.states
	}
}
export default withStyles(styles)(TaskBoard);
export default connect(mapStateToProps, null)(TaskBoard);
export default connect(mapStateToProps, null)(withStyles(styles)(TaskBoard));

Last updated

Was this helpful?