Implementation of SaveXML and ImportXML with Reactjs

Hi guys,

I am working on little project to create bpmn modeler using reactjs. Project should contains modeling (obviously), import of diagrams (in xml-bpmn format), saving (in xml and svg), and basic project sharing between users.
So I decided to use bpmn.js and now I am little stuck at saving and importing. I am trying to use saveXML and importXML functions but without any response or even attach in those functions, probably i messed up something, I am newbie in React. Would you mind to help me a little bit? Thanks


You cannot instantiate multiple modelers from the same DOM element and hope that these share the same state.

You must create and cache the modeler so that you can later use its API to trigger the export.

Oh yes, right, I have basically 2 modelers. So I have to call created modeler from app.js in menu if i wanna use those menu-buttons. Any idea how to do it?

Unfortunately teaching you React is out of scope for this forum. We cannot help you beyond using our tools.