title: What is happening in the this.setState({array})?
body: <p>the line this.setState({array}) is it replacing the array obj in this.state...?</p>
  
  <pre><code>class myComp extends Component {
  
      constructor(props){
          super(props);
  
          this.state = {
              array: [],
              mouseIsPressed: false
          };
      }
  
      componentDidMount() {     
          const array = getInitialArray();
          this.setState({array});
        }
  
        render() {
            return(
            );
        }
  }
  </code></pre>
  
  <p>When I console log rite after that line this.state is the same as before that line.</p>
  
  <p>Also, the line is usually used like this.setState({abc: abc}); how is that line diffrent?</p>