Check out example codes for "bootstrap sticky top". It will help you in understanding the concepts better.

Code Example 1

<nav class="navbar sticky-top navbar-light bg-light">
  <a class="navbar-brand" href="#">Sticky top</a>
</nav>

Code Example 2

<div class="position-static">...</div>
<div class="position-relative">...</div>
<div class="position-absolute">...</div>
<div class="position-fixed">...</div>
<div class="position-sticky">...</div>

Learn ReactJs, React Native from akashmittal.com