Replies: 1 comment
-
|
That was happening because multiple event handlers were getting registered which can be avoid like so: useEffect(() => {
const afterlayoutHandler = () => console.log("after layout");
graph?.once('afterlayout', afterlayoutHandler)
return () => {
graph?.off('afterlayout', afterlayoutHandler)
}
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was trying to make use of a graph event
afterlayoutand happened to notice that it gets fired multiple times!This is far from ideal. What can be done to fix this?
Beta Was this translation helpful? Give feedback.
All reactions