Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

219
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda