-1

I am new to react using react bootstrap table to show the list of customers and click on the each row should take back to the detail view. I am looking a way to go back to the list view from detail page. How can I achieve that?

ssl
  • 115
  • 1
  • 10

1 Answers1

0

Working Solution:

react-router (v4) how to go back?

constructor(props){
   super(props);
   this.goBack = this.goBack.bind(this); // i think you are missing this
}

goBack(){
    this.props.history.goBack();
}

.....

<button onClick={this.goBack}>Go Back</button>
ssl
  • 115
  • 1
  • 10