title: Is using document.getElementById in React an anti-pattern?
body: <p>I am doing this at some point in my React app:</p>
  
  <pre><code>document.getElementById(element).scrollIntoView({ behavior: "smooth" });
  </code></pre>
  
  <p>As a beginner, I have two questions around this:</p>
  
  <p>1) Is this considered bad practice in React? Should I rather use refs?</p>
  
  <p>2) Am I technically modifying the DOM in any way using this technique? As far as I know, I am not, but maybe there's something going on in the background I'm not aware of.</p>