Setter function causing rerender of all page #2774
-
Hello! I have some problem with rendering. When trying to call a function for update store data, all components using this store are re-rendered, as a result of which even input lags occur in the forms for entering data. What could be causing this problem? In the project, for convenience, I wrote my own functions for creating a store and setters for managing fields in the store, the code for which I will add below. Slice of Modal component where i'm enter data:
Zustand Store:
Page With Components:
My function for creating store:
Setter generator for store:
I appreciate every response and reaction to this discussion. Thank you 🙏🙏🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Sorry, i'm not using in array pick's useShallow. Remove please this discussion, I'm ashamed 😅 |
Beta Was this translation helpful? Give feedback.
Sorry, i'm not using in array pick's useShallow. Remove please this discussion, I'm ashamed 😅