title: Javascript map method not working as expected
body: <p>What cause printing every array index twice time using map method. Does component is double rendered? Why it working like that?</p>
  <pre><code>import React from 'react';
      
  const data = [
    { id: 1, name: 'john' },
    { id: 2, name: 'peter' },
    { id: 3, name: 'susan' },
    { id: 4, name: 'anna' },
  ];
      
  const UseStateArray = () =&gt; {
    const [people,setPeople] = React.useState(data)
  
    return &lt;&gt;
    {
      people.map((person)=&gt;{
        console.log(person);
      })
    }
    &lt;/&gt;;
  };
  </code></pre>
  <p>My output in console is:</p>
  <pre><code>{id: 1, name: &quot;john&quot;}
  {id: 2, name: &quot;peter&quot;}
  {id: 3, name: &quot;susan&quot;}
  {id: 4, name: &quot;anna&quot;}
  {id: 1, name: &quot;john&quot;}
  {id: 2, name: &quot;peter&quot;}
  {id: 3, name: &quot;susan&quot;}
  {id: 4, name: &quot;anna&quot;}
  </code></pre>