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

155
Vistas
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 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