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

211
Vistas
Jquery Ui is not working in react functional component

I want to achieve Resizable in React using Jquery UI.

I have code like this..

import $ from 'jquery';
import 'jquery-ui'; 

...
...

useEffect(() => {
    $(function () {
      $(".resizable").resizable();
    });
  }, [])

...
...

<div className="resizable" >Test</div>

I dont get the error but the resizable is not working ...

I want acheive like this jqueryui.com/resizable

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

0

Try this

First, install jquery-ui-bundle

npm install jquery-ui-bundle --save

Then,

import React, { useEffect, useRef } from 'react';
import $ from 'jquery';
import 'jquery-ui-bundle';
import 'jquery-ui-bundle/jquery-ui.css';

...
...
const ref = useRef();

useEffect(() => {
    $(function () {
      $(ref.current).resizable();
    });
  }, [ref.current]);

...
...

<div className="resizable" ref={ref}>Test</div>

Upon doing some googling I found while using jquery-ui we can import individual widgets (could be quite cumbersome) or install jquery-ui-bundle instead and import it only once.

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