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

162
Visualizações
}' expected. JavaScript

I was trying to use the style tag in order to make the website I'm working for, much more mobile-friendly, however, the style tag was giving me errors

const styleCheck = () => {
        return (
            <div>
                <style>
                    Grid {
                        display: flex
                    }
                </style>
            </div>
        )
    }

The idea is that Grid is a different tag that I use later on, in the return value for the main function and hence I wanted to change it's location depending on whether the user is browsing in mobile mode or on a larger screen like a laptop.

However, the program is giving me error on the display:flex line. It states that }' expected and on the } right below the line it gives the error: Unexpected token. Did you mean {'}'} or &rbrace;?

I could, of course, give more code if necessary, but I'm curious as to the reasoning for this error in the style tag.

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