actionNodesData is being directly changed in the diagram editor
Opened this issue · 0 comments
OscarMrZ commented
As per the react documentation, objects put into state:
const [actionNodesData, setActionNodesData] = useState({});
Should be considered as read-only, however, in the diagram editor , this is the case repeteadly, for example:
actionNodesData[name] = {
input: [],
output: [],
ids: [node.getID()],
color: node.getColor(),
};
The logic should be changed so a new object is created, filled and then the state properly updated. This would remove the need of #168, which is just a hotfix imo.