📌  相关文章
📜  如何在 reactjs 中从数组中删除对象 - Javascript 代码示例

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

代码示例1
onDeleteObject = (country) => {
        const newCountries = this.state.countries.filter(element => element.id !== country.id);
        this.setState({ countries: newCountries });

    }