title: How to animate UI in react?
body: <pre><code>  const animate_boxes = () =&gt; {
      inner_ref.current.style.transform = &quot;scale(0)&quot;;
      setTimeout(() =&gt; {
        if (inner_ref &amp;&amp; inner_ref.current) {
          inner_ref.current.style.transform = &quot;scale(1)&quot;;
        }
      }, 200);
    };
  </code></pre>
  <pre><code>useEffect(() =&gt; {
    animate_boxes();
  }, [trigger])
  </code></pre>
  <p>Currently, that is how I do it.</p>
  <p>Is is this the standard/good practice way?
  If not, how can I re write the code above to simplify?</p>