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

Code Example 1

.center {
  display: block;
  
  margin-left: auto;
  margin-right: auto;
  
  width: 50%;
}

Code Example 2

.someclass {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

Code Example 3

<img src="paris.jpg" alt="Paris" class="center">

Learn ReactJs, React Native from akashmittal.com