Como excluir adereços do URL

  const checkDelete = this.props.location.state.deleted // true
  if(checkDelete){
   this.setState({
    messageAlert:true
   }, () => { 
      history.replace('/home/admins', {state: { deleted : false }}) // false
   }
}
Different Dogfish