title: How to modify an element through a different element's onClick in nextjs?
body: <pre><code>import Link from 'next/link';
  
  function myClick(e){
    console.log(e);
  }
  
  const Index = () =&gt; (
          &lt;section className="min-vh-100"&gt;
              &lt;div className="input_bar border rounded-maximum p-1 mx-1 bg-white d-flex"&gt;
                  &lt;input className="myButton submit_bar text-black" placeholder="Insert your input&amp;hellip;"/&gt;
                  &lt;Link href="#"&gt;&lt;a onClick={myClick} className="input_icon"&gt;&lt;/a&gt;&lt;/Link&gt;
              &lt;/div&gt;
          &lt;/section&gt;
  );
  </code></pre>
  
  <p>I'm using nextjs and I'm trying to change a div's class through a click function in another div, I couldn't find examples of how to do that so I can understand how it works. Thank you.</p>