I am trying to use connect in redux react as
Connect (mapstate.., mapdis..) (withstyles(dashboardstyle)(dashboard)
The above works fine but I need to add withRouter as well. Below change gives error Connect (mapstate.., mapdis..) (withstyles(dashboardstyle), withrouter(dashboard))
Whenever I add it gives exception such as cannot use class as a function. Any ideas how this can be fixed