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

Code Example 1

position: absolute;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
text-align: center;

Learn ReactJs, React Native from akashmittal.com