Check out example codes for "defer script html". It will help you in understanding the concepts better.
Code Example 1
Code Example 2
<script src="demo_defer.js" defer></script>
Learn ReactJs, React Native from akashmittal.com