Need to implement jsPlumb in react and I have analysed that jsPlumb with react integration is licensed ReactjsPlumb.
I need open source plugin which works as jsPlumb in react and and tried the below:
I'm unable to use these plugin's since both plugin's are written in TypeScript. Is there are any other plugins available like jsPlumb in react with pure react functionality.
Somehow, added jsPlumb community version in react like below:
class App extends Component {
componentDidMount() {
//later we use like that , is this recommended ?
// $(".item").resizable({
// resize : function(event, ui) {
// jsPlumb.repaint(ui.helper);
// },
// handles: "all"
// });
jsPlumb.ready(function() {
jsPlumb.connect({
source:"item_left",
target:"item_right",
endpoint:"Rectangle"
});
jsPlumb.draggable("item_left", {containment:"parent"});
jsPlumb.draggable("item_right", {containment:"parent"});
});
}
render() {
return (
<div id="diagramContainer">
<div id="item_left" className="item"></div>
<div id="item_right" className="item"
style={{marginLeft:"150px"}}></div>
</div>
);
}
}
I don't know that, using jsPlumb (javascript + jQuery) with react will be a wiser choice, because jsPlumb handles drag and drop internally and handling DOM directly. React is different.This feels somehow like a deadlock... Any suggestions?