Skip to content

Does destructuring hits performance? #913

Closed Answered by dai-shi
fernandoeeu-g4 asked this question in Q&A
Discussion options

You must be logged in to vote

is the latter the same as const state = useUserState() as quoted here

Yes.

In case you missed it, we have valtio that automatically optimizes with destructuring. Alternatively, react-tracked supports zustand too.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@fernandoeeu-g4
Comment options

Answer selected by fernandoeeu-g4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants