Weird State Performance Issue
Hello,
I am working on a project right now where I have a list of components that are based off of a zustand state object. Each of these components in the list is assigned to a specific <key, value> in the zustand state object, and state is updated whenever one of the form items is changed. I am running into a performance issue with this however, since every time a form value changes it re-renders the entire list of components. Most of the changes I am making to the state however, do update the file object but not the values from the object that actually get rendered (the component updates more metadata-esque items).
I have attached a diagram that I think might help explain this a little better. Does anyone have any recommendations on how to make this more performant? Thanks in advance for the help!
0 Replies