Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

216
Views
It says "unexpected token" when using Google maps the same way as presented in the documentation?

I am using the code provided by Google on their website to implement Google Maps API into my code. Now, this is Reactjs, and they are using it within the index.js file while I am using it in a separate component, so that might be the reason behind the error.

Here is a link to their code, and if you scroll down, you will see the complete code (no explanations) in code sandbox. Now I will show you how I am implementing it down below.

Here is my code for the father component (the component that I will call the map component), and here is the actual component (the child) where I implement the map API, which it will be called to the father.

enter image description here

I do not know what to do there, so I have tried to implement the fundamentals of code for it as Google has, but when I do, my screen goes blank. And I mean when I use this:

const Map: React.FC<{}> = () => {};

How can I solve this?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!