splice state array react code example
Example 1: splice state react
const array = [...this.state.people];
array.splice(i, 1);
this.setState({people: array});
Example 2: splice state react
const array = [...this.state.people];
array.splice(i, 1);
this.setState({people: array});