how to remove item in 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 )
}));
}