title: How to make element appear on scroll with vue
body: <p>I've a problem with my vuejs app (nuxt 2.15) : I make my elements appear on scroll with a class <code>.appear</code> that I add &quot;manually&quot; with this method (bind to a scroll event) :</p>
  <pre><code> document.querySelectorAll('.part &gt; *:not(.appear)').forEach(element =&gt; {
              const posTop = rect(element).top
              const trigger = window.innerHeight * 0.8
              if (posTop &lt; trigger) {
                  element.classList.add('appear')
              }
   })
  </code></pre>
  <p>This part work but the problem is that sometimes when a component re-render the class <code>.appear</code> is deleted by vue. How can i fix that issue ?</p>