title: Problem when pass data in ReactJS with props and state
body: <p>I have the problem when I try to pass the props through the function component .In parent component I have a state of currentRow with return an array with object inside, and I pass it to child component. It return a new object with an array inside it. What can I do to avoid it and receive exact my currentRow array.</p>
  <p>there is example of the way I do it
  Parent component</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import React, { useState } from "react";
  import ToolBar from "./Toolbar";
  function Manage() {
      const [currentRow, setCurrentRow] = useState();
      console.log("from manage", currentRow);
      return (
          &lt;div&gt;
              &lt;ToolBar currentRow={currentRow} /&gt;
          &lt;/div&gt;
      );
  }
  
  export default Manage;</code></pre>
  </div>
  </div>
  </p>
  <p>Child Componet</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import React from 'react'
  function ToolBar(currentRow) {
      console.log("from toolbar", currentRow);
      return(
          &lt;div&gt;&lt;/div&gt;
      );
  }
  
  export default ToolBar</code></pre>
  </div>
  </div>
  </p>
  <p>And this is my Log
  <a href="https://i.stack.imgur.com/ax5Gu.png" rel="nofollow noreferrer">enter image description here</a></p>