Best way to structure your store for large number of values #2882
Unanswered
saimarshadsaim31
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So, a little bit of context: I am very new to Zustand and wanted to try it, so I decided to use it in my project which is a car app. In the project, I have car filtering functionality where I have a lot of filters which are of different types. The structure is as follows:
so, I was wondering what is the best way to structure your store should I make one filter state and set it when any of the value
in it changes or should I make each filter as individual state and have a setter for that. Also I want two very specific features:
What is the best and peformant way to do this and what are the things I need to take care of so that I don't end up rerendering more than required. A detailed explanation would be a great help.
Beta Was this translation helpful? Give feedback.
All reactions