Usage with JSX
See original GitHub issueThe demos create everything on window.onload
and render directly to document.body
.
The closest thing I could find was adventure-weave’s index.tsx which returns a DiagramWidget
on its render()
, but that’s just a wrapper and the actual work is also done during window.onload
.
In my case that wouldn’t really work - I already have a full app with redux, grommet, routing, other “pages” (so the diagram would not be always visible), etc. The ideal way would be for DiagramWidget
to be wrapped by a Component
that abstracts all that and just renders the diagram in the provided div, I guess.
I realize you guys are not fans of JSX, but many people don’t really have an option there (: - plus the “default” way to start learning React usually uses JSX.
Apologies if this looks like a noobish request, but Is there an example about linking it? What would be the best way to do it?
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
@dylanvorster Essentially @m4rcelofs is asking for an example/way to use react-diagrams in a declarative manner. If I understand correctly. Which would add value to the project.
Ha, totally correct - and a totally stupid mistake (forgot to set the parent element as
display: flex
). Thanks for the other pointers too! I might be bugging you guys a little until I understand the lib better (: