Check out example codes for "how to not have .html in url". It will help you in understanding the concepts better.
Code Example 1
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]
Learn ReactJs, React Native from akashmittal.com