I faced a problem importing the google Maps script on react project. The API key will be public when I use the <script> (<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>) method. The API key is seen on View Page From Browser. So anyone can use my API key. So google billed me a huge.
But with withScriptJs HOC method, it worked fine. But created an error when I navigated to another route where the exit was already another map component. Error is map API called duplicate.
So How to fix it?