how to use splice in react js 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});