Snapshot not change due to subscribe after delete #1152
Unanswered
pilaoda
asked this question in
Bug report
Replies: 2 comments 4 replies
-
|
No, it sounds like a bug. Nice catch. Would you like to add a failing test and see if removing |
Beta Was this translation helpful? Give feedback.
4 replies
-
|
PR here: #1153 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Bug Description
Is this behavior by design? Why skip version update if listeners is not empty?
valtio/src/vanilla.ts
Line 203 in 7537417
I can't trigger a re-render if a nested obj prop is deleted before the
subscribeofuseSyncExternalStorecalled.valtio/src/react.ts
Line 136 in 7537417
I found out it is due to the version not update if it is subscribed after delete.
Reproduction Link
https://stackblitz.com/edit/node-ycp9r3?file=index.js
Beta Was this translation helpful? Give feedback.
All reactions