Is this save? will this.props.history push ignore setState since setState is async?
if (id) {
    this.props.history.push(`/edit/${data.id}`)
  this.setState({
    showMsg: 'saved'
  })
}
or I should do this?
if (id) {
  this.setState({
    showMsg: 'saved'
  }, ()=>this.props.history.push(`/edit/${data.id}`))
}
 
    