You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first way feels more convenient, but the official website cases are written in the second way. do two different ways of getting a value have different implications?
The text was updated successfully, but these errors were encountered:
@liuseen-l the first way would cause extra renders if you want to only re render a component when age changes that's why you need to use a selector, the second use a selector in order to optimize that
const { age } = useStore()
const age = useStore((state) => state.age)
The first way feels more convenient, but the official website cases are written in the second way. do two different ways of getting a value have different implications?
The text was updated successfully, but these errors were encountered: