-
Notifications
You must be signed in to change notification settings - Fork 77
Closed
Description
Steps to reproduce
Log something in the DiagramElementPalette or DiagramPalette composant.
Expected behavior
When the palette is closed, we should not see any logs.
Actual behavior
Since we're using the useViewport(); hook, the palette re renders when the viewport changes, meaning the palette gets re rendered a lot during a move.
What to do
We should get the value of the viewport directly from the store instead of using the useViewport() hook.
const store = useStoreApi();
const [viewportX, viewportY, viewportZoom] = [...transform];