Answers for "use javascript library in react"

0

use javascript library in react

class MainView extends Component {
  render() {
    // don't render anything
    return <div/>;
  },

  componentDidMount() {
    // find the DOM node for this component
    const node = ReactDOM.findDOMNode(this);

    // widget does stuff
    $(node).activateMyCoolWidget();

    // start a new React render tree with widget node
    ReactDOM.render(<div>{this.props.children}</div>, node);
  }
});
Posted by: Guest on May-06-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language