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

88
Vistas
how to use jquery from cdn in react's component

I am using Jquery with CDN in react's index.html file.. Unfortunatelly, this is how it should be and can't install react separately with yarn.

How can I use now $ in React's components ?

I can't do import $ from Jquery. and if i use $ directly, it's not defined.

Any idea ?

I also tried useEffect, but in that, $ is not defined at first.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

have you tried with npm or yarn.

npm install jquery

import $ from "jquery"

I have tried it and its working fine.

 if ($(".enclosing_container ").length) {
      $(".enclosing_container div").remove();
    } else {
      $(".main-row div").remove();
      this.setState({ focusUI: false });
    }
about 4 years ago · Juan Pablo Isaza Denunciar
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