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

Making sure models created with useLocalStore stop updating the state on update #914

Merged

Conversation

yard
Copy link
Contributor

@yard yard commented Jul 9, 2024

As described in #913, when a model created by useLocalStore is re-created due to dependency array change, it won't unsubscribe itself and will continue delivering state updates to (now new) model.

The test case added in this PR demonstrates exactly that (fails on current master, works in this branch).

Copy link

vercel bot commented Jul 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
easy-peasy ❌ Failed (Inspect) Jul 9, 2024 1:24pm

Copy link
Collaborator

@jmyrland jmyrland left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! LGTM 👍

@jmyrland jmyrland merged commit 0e7da8d into ctrlplusb:master Jul 11, 2024
7 of 8 checks passed
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