-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project idea: React Flow Widget #32
Comments
Screen.Recording.2023-07-19.at.11.06.22.movthis works now with anywidget! |
@kolibril13 Did you get any further with this, and/or publish anything more about your efforts? I think I know how I can solve the zustand issue (you must wrap in |
@cpbotha how do you build? Using esbuild? Can you provide more details? |
Wow @maartenbreddels thank you! I am using esbuild as per the readme. However, I'm running into react issues on I can partially reproduce these issues using the threejs-fiber example from this repo, so I think it will make more sense to create a new issue in the coming few minutes. Update: Just created #59 |
yes, I've made this with anywidget: and here's another project you might be interested in: |
Aaah this is great, thank you very much @kolibril13 !! I only discovered later that |
I think if you can use anywidget or ipyreact depends on how you need to use the library. With ipyreact you can compose your widgets into a full react tree. Currently with react+anywidget you need to compose the full react tree from the data, AFAIK you cannot compose multiple widgets together using anywidget without having a separate react tree. All depends on the use case and the complexity you need or are willing to accept. In our case, we need this for antd (or MUI) where we want to create widgets, and put them together in a single react tree (with a share react complex and no extra divs in between). That said, I think anywidget + esbuild is probably easier and has less chances on issues (like the one you encountered in #59) |
Thank you Maarten that makes a lot of sense.
Once one has ipyreact working, it's short iterative cycles (with your react straight in the notebook cell), including composable widget trees, does look compelling. In this case, I did indeed get it working in AnyWidget, which for my case is sufficient, with the added benefit that I can use the more conventional frontend tooling to fine-tune the react stuff. |
It would be interesting to see if it was possible to use React Flow in an ipyreact Widget. That would be really nice to have!
Copy+Pasting this minimal example
https://reactflow.dev/docs/getting-started/building-a-flow/#getting-started
gives this error:
and some further debugging did also not lead to any working result.
@maartenbreddels : You're very welcome to not interact with this issue, you invested so much time already in this awesome project, and I don't want to overstretch your bandwidth.
@paddymul : As you already worked with react and in case that you currently have time and motivation for this, would you like to give this a try and see if you can get this to work? That would be awesome!
I also found some CSS that might be needed for this at:
https://github.com/wbkd/react-flow/tree/2e1f360817915f84743b6e0ca390f57f1bb2a57a/packages/core/src/styles
The text was updated successfully, but these errors were encountered: