Check out example codes for "how center content in css by using flex". It will help you in understanding the concepts better.

Code Example 1

/* HORIZONTAL */
justify-content: center;

/* VERTICAL */
align-items: center;

Code Example 2

flex-direction: column;
align-items: flex-start; //left
align-items: center; //center
align-items: flex-end; //right

Code Example 3

display: flex;
    width: 60%;
    justify-content: center;
    margin: 0 auto;

Learn ReactJs, React Native from akashmittal.com