Check out example codes for "html images @2x". It will help you in understanding the concepts better.

Code Example 1

<img
 srcset="
  /assets/img.jpg 4x,
  /assets/img.jpg 3x,
  /assets/img.jpg 2x,
  /assets/img.jpg 1x,
 "
 src="/assets/img.jpg"
>

Learn ReactJs, React Native from akashmittal.com