Check out example codes for "how to get my div to centre of primary div". It will help you in understanding the concepts better.

Code Example 1

.div{margin: 0 auto;}

Learn ReactJs, React Native from akashmittal.com