-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
fixed issue with .has() when new value is added and then deleted or c… #981
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
commit: |
Size Change: +49 B (+0.36%) Total Size: 13.6 kB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on it. Is it possible to add a test?
…make sure it updates with useSnapshot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it probably requires more.
Is there anything else that needs doing before this gets merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes extra rerenders with .has()
, which doesn't seem ideal, but can't be helped. It's ironic that the use of .has()
should be discouraged, even though proxyMap/Set should exist for performance.
Yeah - |
Are we waiting on anything to get this merged and get a patch version published? |
…leared
Related Bug Reports or Discussions
#979
Fixes #
#979
Summary
Accessing this.index in the has method doesn't seem to work when a new item is added and then deleted (or cleared) at a later time. Accessing the this.data.length property fixes this issue.
Check List
pnpm run prettier
for formatting code and docs