question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The 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:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alexisvincentcommented, Mar 21, 2017

@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.

0reactions
m4rcelofscommented, Mar 21, 2017

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 (:

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introducing JSX
It is called JSX, and it is a syntax extension to JavaScript. We recommend using it with React to describe what the UI...
Read more >
JSX in React – Explained with Examples
JSX is a JavaScript Extension Syntax used in React to easily write HTML and JavaScript together. ... This is simple JSX code in...
Read more >
TypeScript: Documentation - JSX
Basic usage · The as operator · Type Checking · Intrinsic elements · Value-based elements · Attribute type checking · Children Type Checking...
Read more >
JSX Full Form
JSX stands for JavaScript XML. It is simply a syntax extension of JavaScript. It allows us to directly write HTML in React (within ......
Read more >
What is JSX?
JSX stands for Javascript XML and it is a very useful tool for React developers. JSX is an extension of the JavaScript language...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found