Check out example codes for "rem vs em". It will help you in understanding the concepts better.

Code Example 1

em -> is relative to the font-size of its direct or nearest parent 
rem -> is relative to the html (root) font-size

Learn ReactJs, React Native from akashmittal.com