delete item in react js 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 )
}));
}