📅  最后修改于: 2022-03-11 14:58:37.993000             🧑  作者: Mango
//1 component
removetour=id=>{
const {tours}=this.state;
const sortedtour=tours.filter(data=>data.id!==id );
this.setState({
tours:sortedtour,
});
}
//second component
{removetour(id)}} className="close-btn">