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