Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

209
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!