Skip to content

About best practice, using it in project the first time, I've written tons of boilerplate, wondering if it can be more concise? #754

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

You must be logged in to vote

That looks good to me. Alternatively, you could combine them like in an array and use shallow.

If you are looking for another practice, we can define actions outside useStore in advance.
See: https://github.com/pmndrs/zustand/wiki/Practice-with-no-store-actions

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by FateRiddle
Comment options

You must be logged in to vote
1 reply
@dai-shi
Comment options

Comment options

You must be logged in to vote
3 replies
@dai-shi
Comment options

@TheRefineryAU
Comment options

@dai-shi
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants