title: Hey how do I convert this JS into react?
body: <p>I am quite new in react and just struggling a bit to make it work properly.
  So here is a snippet from JS file and I need to convert it react.</p>
  <pre><code>let squares = document.getElementsByClassName(&quot;square&quot;);
  
   for (let i = 0; i &lt; squares.length; i++) {
     squares[i].addEventListener(&quot;mouseenter&quot;, () =&gt; {
       squares[i].classList.add(&quot;light&quot;);
       setTimeout(function () {
         squares[i].classList.remove(&quot;light&quot;);
       }, 800);
     });
   }
  </code></pre>
  <p>In that react component I have just some divs with className=&quot;square&quot;</p>
  <pre><code>export default function SomeComponent() {
    return (
      &lt;div className=&quot;row &quot;&gt;
        &lt;div className=&quot;square&quot;&gt;&lt;/div&gt;
        &lt;div className=&quot;square&quot;&gt;&lt;/div&gt;
        &lt;div className=&quot;square&quot;&gt;&lt;/div&gt;
        &lt;div className=&quot;square&quot;&gt;&lt;/div&gt;
        &lt;div className=&quot;square&quot;&gt;&lt;/div&gt;
        &lt;div className=&quot;square&quot;&gt;&lt;/div&gt;
        &lt;div className=&quot;square&quot;&gt;&lt;/div&gt;
        &lt;div className=&quot;square&quot;&gt;&lt;/div&gt;
        &lt;div className=&quot;square&quot;&gt;&lt;/div&gt;
        &lt;div className=&quot;square&quot;&gt;&lt;/div&gt;
      &lt;/div&gt;
    );
  }
  </code></pre>