If you want to use history while passing a function as a value to a Component's prop, with react-router 4 you can simply destructure the history
prop in the render attribute of the <Route/>
Component and then use history.push()
<Route path='/create' render={({history}) => (
<YourComponent
YourProp={() => {
this.YourClassMethod()
history.push('/')
}}>
</YourComponent>
)} />
Note: For this to work you should wrap React Router's BrowserRouter Component around your root component (eg. which might be in index.js)