Cómo eliminar un objeto de la matriz en reactjs

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

    }
JDBC