Check out example codes for "how to put image center in html stack overflow". It will help you in understanding the concepts better.

Code Example 1

img {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -(X/2)px;
    margin-top: -(Y/2)px;
}

Learn ReactJs, React Native from akashmittal.com