Check out example codes for "centering horizontally". It will help you in understanding the concepts better.

Code Example 1

div.center{display:block;margin:auto;width:50%;}
p.center{text-align:center;}

Learn ReactJs, React Native from akashmittal.com