Drawflow icon indicating copy to clipboard operation
Drawflow copied to clipboard

React Wrapper

Open duduccosta opened this issue 3 years ago • 2 comments

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!

duduccosta avatar Nov 05 '21 07:11 duduccosta

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

jerosoler avatar Nov 05 '21 07:11 jerosoler

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

herrardo avatar Dec 05 '21 09:12 herrardo