Check out example codes for "force to load https". It will help you in understanding the concepts better.

Code Example 1

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]

Learn ReactJs, React Native from akashmittal.com