I have tried all the suggested ways in other threads and it is still not working which is why I am posting the question.
So I have history.js looking li
Looks to me like you might be missing a withRouter connection. this would make the history props available to this component
...
import { withRouter } from 'react-router'
class Home extends Component {
functionMethod() {
const { history: { push } } = this.props;
doStuff();
push('/location');
}
...
}
export default withRouter(Home);
https://reacttraining.com/react-router/web/api/withRouter