I want to add an element to the end of a state array, is this the correct way to do it?
this.state.arrayvar.push(newelement);
this.setState({ arrayvar:this.state.arrayvar });
I amI'm concerned that modifying the array in-place with push might cause trouble - is it safe?
The alternative of making a copy of the array, and setStateing that seems wasteful.