title: Why cannot define array variable in state of react class?
body: <p>I've created a React class with state variable as array type. </p>
  
  <pre><code>export default class Demo extends React.Component {
    constructor(props){
      super(props)
      this.state ={
        test: []
      }
    }
  </code></pre>
  
  <p>Now, when I use <code>console.log(this.state.test)</code> in <code>render</code> function then it returns <code>object</code> type. I thought it is for the unique-key purpose when mapping. </p>
  
  <p>But, what if I just want to define an array for push method?</p>
  
  <p>Is there any other way to define the same? Please guide.</p>