I have been trying to import an external library (google Maps) in order to use it in a React component
index.html file
The error is because the google api is not loaded before your React Component is loading.
Place the script tag for google in the header, before loading your react scripts.