Replies: 1 comment
-
|
xyflow-zustand-repro-github.zip |
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.
-
Hi everyone! I'm testing strange behaviour in my code with react version of xyflow.
I test dragging perfomance on 100 simple nodes withoud connected edges (arrows). When I use
everything is smooth both with devtools opened and closed.
When I use function from my custom Zustand store with this function
dragging becomes laggy (with drops to 2fps and freezes).
My store consists of slices and uses some middlewares like zundo and immer:
I tried comment them and use store without them - nothing changed.
I've attached editorSlice as it is too big to show here), but here is the onNodesChange function.
Why it could possibly so dramatically drop in perfomance?
Beta Was this translation helpful? Give feedback.
All reactions