Answers for "is jquery needed for react"

2

Installing jQuery in react js

// First run a command
npm install jquery --save
//Then import it and use it.
import $ from 'jquery';
Posted by: Guest on October-24-2021
0

react in jquery

class SomePlugin extends React.Component {
  componentDidMount() {
    this.$el = $(this.el);    this.$el.somePlugin();  }

  componentWillUnmount() {
    this.$el.somePlugin('destroy');  }

  render() {
    return <div ref={el => this.el = el} />;  }
}
Posted by: Guest on May-05-2021

Code answers related to "is jquery needed for react"

Browse Popular Code Answers by Language