Putting dom reference into store will cause lag #2079
Unanswered
MilesLeeeeee
asked this question in
Bug report
Replies: 1 comment
-
Can anyone look into this? |
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
-
Summary
Hello
I tried putting the dom reference into the store to make it easier for me to use, but I found that it made the browser lag.
I tested in three browsers
chrome:117
edge:117
firefox:116
Chrome and edge are experiencing serious lags
firefox runs fine
Is there something wrong with my operation or should I not put the dom reference into the store?
Link to reproduction
https://codesandbox.io/s/zustand-dom-test-d7g4l3?file=/src/App.js
You can see the difference by changing the comment on this line
Beta Was this translation helpful? Give feedback.
All reactions