Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(chore): upgrade zustand #840

Merged
merged 2 commits into from
Nov 21, 2024
Merged

(chore): upgrade zustand #840

merged 2 commits into from
Nov 21, 2024

Conversation

ilan-gold
Copy link
Collaborator

Towards #745 (comment)

Background

https://zustand.docs.pmnd.rs/migrations/migrating-to-v5

Change List

  • Migrate to useShallow hook where we used shallow before or where applicable (returning new references)

Checklist

  • Update JSdoc types if there is any API change.
  • Make sure Avivator works as expected with your change.

@ilan-gold ilan-gold requested a review from manzt November 20, 2024 14:32
Copy link
Member

@manzt manzt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No familiar with the library, but left a comment.

store.image
]);
const [fullLoader, image] = useChannelsStore(
useShallow(store => [store.loader, store.image])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No familiar with this library, but this change looks different from the others. Why is the shallow needed here but not before?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or where applicable (returning new references)

I got the error which the upgrade mentioned without it, and this is a new reference

@ilan-gold ilan-gold merged commit b413d53 into main Nov 21, 2024
5 checks passed
@ilan-gold ilan-gold deleted the ig/upgrde_zustand branch November 21, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants