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

Code Example 1

/* HORIZONTAL */
justify-content: center;

/* VERTICAL */
align-items: center;

Code Example 2

display: flex;
align-items: center;
justify-content: center;

Learn ReactJs, React Native from akashmittal.com