Jul 15, 2022
--
Great article. One correction in the code
this.setState({
userArray: this.state.userArray.push(6)
});
This would cause a rerender, because array's push method returns the new length of array.
So in this case new state will be {userArray : 6}.