Check out example codes for "center a spinner css". It will help you in understanding the concepts better.

Code Example 1

.loader {
  left: 50%;
  margin-left: -4em;
}

Learn ReactJs, React Native from akashmittal.com