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

156
Visualizações
React helmet doesn't execute the script tag in the right order

There are two external resources and one custom JS file to load up into the component. The custom JS file should be executed only after the external resources. However, it doesn't really work this way even though defer keyword has been put on. It seems like the custom JS file is executed first. I wonder what's going wrong with this approach?

import React, { Fragment, useEffect, useRef } from "react";
import "./Home.css";
import { Helmet, HelmetProvider  } from 'react-helmet-async';
import ShowCase from "./ShowCase";
import BookCarousel from "./BookCarousel";
import Testimonial from "./Testimonial";
import SignUp from "./SignUp";
import Contact from "./Contact";
const Home = () => {

  return (
    <HelmetProvider>
        <Helmet>
            <script type="text/javascript" defer src="https://code.jquery.com/jquery-1.12.4.min.js" ></script>
            <script type="text/javascript" defer src="https://unpkg.com/scrollreveal" ></script>
            <script type="text/javascript" defer src="./carousel.js"></script>
        </Helmet>
        <ShowCase />
        <BookCarousel />
        <Testimonial />
        <SignUp />
        <Contact />
    </HelmetProvider>
  );
};
export default Home;
about 4 years ago · Santiago Gelvez
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