Check out example codes for "animate on scroll github". It will help you in understanding the concepts better.

Code Example 1

<script src="https://unpkg.com/[email protected]/dist/aos.js"></script>
  <script>
    AOS.init();
  </script>

Code Example 2

<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/aos.css" />

Learn ReactJs, React Native from akashmittal.com