title: React.js Can't read property of undefined V18
body: <p>i'm making a simple app and here i make a button and pass some props to it</p>
  <pre><code>&lt;HeaderContainer buttonToLink={'/signin'} buttonToText ={'Sign in'}&gt;
  //some code goes here
  &lt;/HeaderContainer&gt;
  </code></pre>
  <p>then in another file i handle it</p>
  <pre><code>export  function HeaderContainer({children , ...restpros}) {
  console.log(restpros.buttonToLink,restpros.buttonToText)
  return (
      &lt;Header&gt;
          &lt;Header.Frame&gt;
              &lt;Header.Logo to={'/'} src = {Logo} alt = {'NetFlix'} /&gt;
              &lt;Header.ButtonLink to ={restpros.buttonToLink} &gt; &lt;p&gt;{restpros.buttonToText}&lt;/p&gt;&lt;/Header.ButtonLink&gt;
          &lt;/Header.Frame&gt;
          {children}
      &lt;/Header&gt;
  )}
  </code></pre>
  <p>i got the error</p>
  <blockquote>
  <p><strong>Can't read property of undefined</strong></p>
  </blockquote>
  <p>and i don't know why i get undefined because i pass my props to it</p>
  <p>note : <strong>Header.ButtonLink</strong> is a react router link and i use styled component for styling</p>