Check out example codes for "how to make preloading all the page html". It will help you in understanding the concepts better.

Code Example 1

.loader-wrapper{   z-index: 10;   width: 100%;   height: 100%;   position: fixed; #important    top: 0;   left: 0;   background-color: #242F3F;   overflow-y: hidden }

Learn ReactJs, React Native from akashmittal.com