Check out example codes for "media queries screen width". It will help you in understanding the concepts better.

Code Example 1

@media only screen and (max-width: 600px) {
  body {
    background-color: lightblue;
  }
}

Learn ReactJs, React Native from akashmittal.com