we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "splice state react"
Eleonora
24 Feb 2018
1const array = [...this.state.people];
2array.splice(i, 1);
3this.setState({people: array}); 
4
5                            
6
Aarón
14 Aug 2020
1const array = [...this.state.people];
2array.splice(i, 1);
3this.setState({people: array});