how to remove elements react code example
Example: remove item react
delete(id){
this.setState(prevState => ({
data: prevState.data.filter(el => el != id )
}));
}
delete(id){
this.setState(prevState => ({
data: prevState.data.filter(el => el != id )
}));
}