Check out example codes for "position absolute vertical center". It will help you in understanding the concepts better.

Code Example 1

<style>
.parent { position: relative; }
.centered-element {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
  
</style>

<div class="parent">
 <div class="centered-element">I'm Centered!</div>
</div>

Learn ReactJs, React Native from akashmittal.com