title: Not able to get length of an array
body: <p>I am able to get the value out when I use {userProfile.displayname} and {userProfile.emailacct} which is Batman and batman@demo.com.</p>
  <p>So when I try to count number of reviewers {userProfile.reviewers.length} in the h6 tag, it says <strong>&quot;Cannot read property 'length' of undefined&quot;</strong>. But when I tried this <code>{userProfile.reviewers}</code>, it printed out <code>&quot;5fc519fd1849413ffb6e3ee35fbb3879e8902d14f8c60448&quot;</code></p>
  <p>I don't get it. What am I missing here? Many thanks in advance and greatly appreciated.</p>
  <p>The data below is the console.log(result.data.user) in the useEffect()</p>
  <pre><code>displayname: &quot;Batman&quot;
  emailacct: &quot;batman@demo.com&quot;
  reviewers: (2) [&quot;5fc519fd1849413ffb6e3ee3&quot;, &quot;5fbb3879e8902d14f8c60448&quot;]
  id: &quot;5fb35251888e8d081c06a7fa&quot;
  
  
  
  const[userProfile,setUserProfile] = useState([])
  
  useEffect(()=&gt;{
       Axios.get(`http://localhost:5000/api/user/user/${userid}`, {withCredentials:true}).then(result =&gt; {
          setUserProfile(result.data.user)
          console.log(result.data.user) 
       })     
      },[])
  
   &lt;h2&gt;{userProfile.displayname}&lt;/h2&gt;
   &lt;h4&gt;{userProfile.emailacct}&lt;/h4&gt;
                      &lt;div style={{display:&quot;flex&quot;,justifyContent:&quot;space-between&quot;,width:&quot;120%&quot;}}&gt;
                          &lt;h6&gt;{userProfile.reviewers} reviewers&lt;/h6&gt; 
                      &lt;/div&gt;
                  &lt;/div&gt;
  </code></pre>