Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

210
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda