Calling setEntities twice in a row—first to clear the graph and then immediately to fill it—causes the HTML blocks to disappear. This was discovered when using mocked data; while real network delays might mask it, the issue consistently reproduces when updates happen in rapid succession.
In storybook environment, this reproduces strictly without timeouts, while in my case, even a small timeout does not prevent the issue.
Steps to Reproduce
In the Playground, trigger a function that updates the state without a timeout:
const crashHtml = () => {
setEntities({ blocks: [], connections: [] });
setEntities(generatePlaygroundActionBlocks(10, 100));
};
Actual Behavior
The HTML blocks disappear from the graph. In some cases, even a small timeout between calls doesn't prevent the issue.
Expected Behavior
The graph should correctly render the final set of entities provided in the last setEntities call.
Calling setEntities twice in a row—first to clear the graph and then immediately to fill it—causes the HTML blocks to disappear. This was discovered when using mocked data; while real network delays might mask it, the issue consistently reproduces when updates happen in rapid succession.
In storybook environment, this reproduces strictly without timeouts, while in my case, even a small timeout does not prevent the issue.
Steps to Reproduce
In the Playground, trigger a function that updates the state without a timeout:
Actual Behavior
The HTML blocks disappear from the graph. In some cases, even a small timeout between calls doesn't prevent the issue.
Expected Behavior
The graph should correctly render the final set of entities provided in the last setEntities call.