I want to use a diagram framework called React-diagrams see: https://github

I want to use a diagram framework called React-diagrams see: https://github.com/projectstorm/react-diagrams

inside Vaadin 14 LTS.

Is this add-on help me?

PS: Your npm install does not work

After trying several days the best solution was to create a lit element with a tag for a Composite

element. Also I need to inject the js library in the page.addJavaScript().

It worked but is required a lot of work, and also the communication between the libary and the Java server in my opinion is not optimum.

¿I don´t know if this is the right approach? Even if it works.

If somebody is interested in this problem I hav a POC.

Hi,

I didn’t try to use react inside Vaadin 14. Do you mean that you wrap the react component into a web component?

Once you have a web component it’s “easy” to integrate to a Vaadin application.

I said “easy” because the diagram component is a big component that requires a lot of work and if you want to manipulate from the Java side and the client side then you need to synchronize the state of the component which can be complicated.

There is a similar component in Vaadin 14: https://vaadin.com/directory/component/network-component

Maybe that could help you.

Another solution is to use Vaadin Fusion and the react component in Typescript. That won’t help you for the integration (same installation with npm,…) but you can skip the Java API which will be time consuming.