jerosoler / Drawflow

Simple flow library 🖥️🖱️
https://jerosoler.github.io/Drawflow/
MIT License
4.78k stars 741 forks source link

React Wrapper #290

Open duduccosta opened 3 years ago

duduccosta commented 3 years ago

First of all, congrats for the project, it’s awesome!!

Is it possible to use the project with react? I saw that is possible to use with vue, but I need to use as React Component.

For example, a custom node rendering from a React JSX Component.

Thanks!

jerosoler commented 3 years ago

Hi @duduccosta

Thanks! 😊

Yes, it is possible to use it with react. Since it is pure javascript.

Can't use react jsx components for now. I'll do some research, since I haven't played with react.

If you want to try to add the components of react. Only the addNode and addNodeImport function would have to be modified.

Here is a small example of react. https://github.com/jerosoler/Drawflow/issues/21#issuecomment-668255935

herrardo commented 2 years ago

You could use this react wrapper https://github.com/empathyco/x/blob/main/packages/react-wrapper/README.md