我试图在按下onClick时删除一个div。div存在于我的父组件上render(){constlistPlayers=players.map(player=>());return(ScoreKeeperAsortablelistofplayersthatwithadjustablescores.Warning,don'tgonegative!{listPlayers});}它将props传递给按钮删除div的子组件,在这里return((我剪掉了其余的代码,因为它很长而且在这里没有用)数组(一个单独的文件)被导入到Parent组件中,它是这样的constplayers=[{name: