I am evaluating GoJS as a component of a planned system. I have run into a problem using GoJS with React.
I have created a basic project based on some of the available samples with functionality to add new nodes and edit the text in nodes which works fine. However when I add an eventlistener and set a state inside it, any changes (changed texts and added nodes) revert back to original. Positions are strangely kept but all other user induced changes disappear.
I can read the state with no problems but as soon as I write anything to the state I get this behaviour. There seems to be no problem setting states outside of the eventlisteners. I have tried some different approaches as binding this to the eventlistener as well as using arrow functions with a variable with this in. I have also tried both building my component as a class component and as a functional component with the same result. I have also tried to use the stateful example for React modified to work with JS (as it is TypeScript).
Is this a known problem? Am I doing something wrong or is it a bug?