DEV Community

[Comment from a deleted post]
Collapse
 
markerikson profile image
Mark Erikson

(copying from the Reddit thread for visibility)

I appreciate that you took the time to make this, but this is missing all of the considerable optimization work that's gone into our official useSelector hook.

Also, you should not import the store directly into components!.

This hook should definitely not be used in production.

Collapse
 
dani_akash_ profile image
Dani Akash ๐Ÿงช๐Ÿ’ฅ • Edited

(copying from the Reddit thread for visibility)

I was going through the optimizations in useSelector and also in Zustand. I have a pretty good understanding of the optimization part now. Not sure how to implement the style guide since it requires use of a Provider ๐Ÿค”๐Ÿ˜ต

Thanks for your valuable feedback. I'll improve upon this ๐Ÿ‘

Have also updated the post with your points