title: React.useState Hook only displaying length of object, not object itself
body: <p>Basically, I have a component named Upload:</p>
  <pre class="lang-js prettyprint-override"><code>const Upload = () =&gt; {
      const [scene , setScene] = React.useState([]);
  
      // handleUpload = (event) =&gt; {
      //     console.log('Success!');
      // }
  
  
      function renderHandler(s){
        console.log('[RENDER] calling...')
        console.log(s);
  
        if(scene.length == 0){
          console.log('[RENDER] Denied!')
          return(
            &lt;div&gt;
              Nothing is rendered..
            &lt;/div&gt;
          )
        } else {
          console.log('[RENDER] Working...')
          console.log('[RENDER] Received planes:');
          console.log(blockState);
          console.log(scene);
  
          return (
            &lt;View top={blockState}/&gt;
          )
        }
      }
  
      function parseNBT(input) {
        setScene(scene.push('1'));
        setScene(scene.push('2'));
        console.log('scene:');
        console.log(typeof scene);
        console.log(scene);
        console.log('\n+blockState:');
        console.log(typeof blockState);
        console.log(blockState)
  
  
  
      }
       return (
      &lt;Container&gt;
      Input NBT file &lt;br/&gt;
      &lt;input type=&quot;file&quot; onChange={handleChange}&gt;&lt;/input&gt;
      {renderHandler(scene)}
      &lt;/Container&gt;
    )
  }
  </code></pre>
  <p>The issue here is, when I'm setting the scene's state in parseNBT, and console log scene, it gives me the array:</p>
  <p><a href="https://i.stack.imgur.com/Nwmhc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Nwmhc.png" alt="parsenbt" /></a></p>
  <p>However, when I call it from renderHandler, it simply returns the length of the array, in this case it was 2
  <a href="https://i.stack.imgur.com/REVDu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/REVDu.png" alt="renderhandler weird" /></a></p>
  <p>Very weird, maybe i'm missing something?</p>