Check out example codes for "center an image horizontally and vertically". It will help you in understanding the concepts better.

Code Example 1

.center{
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

Learn ReactJs, React Native from akashmittal.com