📜  如何从 url 中删除道具 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:37.789000             🧑  作者: Mango

代码示例1
const checkDelete = this.props.location.state.deleted // true
  if(checkDelete){
   this.setState({
    messageAlert:true
   }, () => { 
      history.replace('/home/admins', {state: { deleted : false }}) // false
   }
}