return to home page if router history is 0 code example Example: how to go back in usinsg router hisotry this.props.history.goBack(); //react-router (v4)