I seem to be having issues pushing data into a state array.
I am trying to achieve it this way:

this.setState({ myArray: this.state.myArray.push('new value') })

But I believe this is incorrect way and causes issues with mutability?

14 Answers
14

Leave a Reply

Your email address will not be published. Required fields are marked *