Check out example codes for "how to make a responsive box in css". It will help you in understanding the concepts better.

Code Example 1

.square {
  width: 50%;
}

.square:after {
  content: "";
  display: block;
  padding-bottom: 100%;
}

Learn ReactJs, React Native from akashmittal.com