title: Warning: Function components cannot be given refs
body: <p>I'm using Next.js latest version for making my blog website, don't know why show me error, when I'm trying to make my form then show me error like this:</p>
  <pre><code>Warning: Function components cannot be given refs. 
  Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
  </code></pre>
  <p><a href="https://i.stack.imgur.com/LoaG0.png" rel="noreferrer"><img src="https://i.stack.imgur.com/LoaG0.png" alt="enter image description here" /></a></p>
  <p>I'm tried below code:</p>
  <pre><code>import React, { useState } from &quot;react&quot;;
  import { APP_NAME } from &quot;../config&quot;;
  import Link from &quot;next/link&quot;;
  import {
    Collapse,
    Navbar,
    NavbarToggler,
    NavbarBrand,
    Nav,
    NavItem,
    NavLink,
  } from &quot;reactstrap&quot;;
  
  const Header = () =&gt; {
    const [isOpen, setIsOpen] = useState(false);
    const toggle = () =&gt; setIsOpen(!isOpen);
  
    return (
      &lt;div&gt;
        &lt;Navbar color=&quot;light&quot; light expand=&quot;md&quot;&gt;
          &lt;Link href=&quot;/&quot;&gt;
            &lt;NavbarBrand className=&quot;font-weight-bold&quot;&gt;{APP_NAME}&lt;/NavbarBrand&gt;
          &lt;/Link&gt;
          &lt;NavbarToggler onClick={toggle} /&gt;
          &lt;Collapse isOpen={isOpen} navbar&gt;
            &lt;Nav className=&quot;m-auto&quot; navbar&gt;
              &lt;NavItem&gt;
                &lt;Link href=&quot;/signup&quot;&gt;
                  &lt;NavLink style={{ cursor: &quot;pointer&quot; }}&gt;Signup&lt;/NavLink&gt;
                &lt;/Link&gt;
              &lt;/NavItem&gt;
              &lt;NavItem&gt;
                &lt;Link href=&quot;/signin&quot;&gt;
                  &lt;NavLink style={{ cursor: &quot;pointer&quot; }}&gt;Signin&lt;/NavLink&gt;
                &lt;/Link&gt;
              &lt;/NavItem&gt;
            &lt;/Nav&gt;
          &lt;/Collapse&gt;
        &lt;/Navbar&gt;
      &lt;/div&gt;
    );
  };
  
  export default Header;
  
  
  </code></pre>
  <p>please give me your valuable suggestion.</p>