-
-
Notifications
You must be signed in to change notification settings - Fork 264
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Derive working with single derived property, but failing with two #687
Comments
For whatever it is worth, when |
Hmmm, it sounds like a bug. Probably a tough one. Hope someone can dig into it. |
Still trying to wrap my head around what's happening, but just going to share what I got: After initialization of the store the store.byId.a = createItem('a', store);
store.byId.b = createItem('b', store);
await time();
console.log(
sourceObjectMap.get(store.byId.b).pendingCount
); // -4 What seems to happen is that at the time of the Execution order as far as I understand it is:
Thus waiting a tick between store.byId.a = createItem('a', store);
await time();
store.byId.b = createItem('b', store); A solution that might work is to make a shallow copy of the subscriptions before the |
Plus, I haven't yet mentally modelled out why commenting out the |
@DavidMulder0 Hey, have you figured this out? I am experiencing the same issue and its pretty hard to wrap the head around the source code, would be helpful if you can give me a headstart |
I have the same problem as well! After a VERY cursory look, I'm not sure what the point of running without
What's the objective of |
With |
Alright, that's reasonable. Just throwing
I was also attempting derive state from 2 separate proxy objects. For that, I've just created a third proxy object, which I update with |
btw, here's an RFC related to this issue: #792 |
Transferred to: valtiojs/derive-valtio#2 |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Summary
Have a hard time describing the issue, because if I had figured out what's exactly going on I would be doing a pull request instead of a bug report, however I do have a decently clean MVE:
Link to reproduction
https://codesandbox.io/s/laughing-gates-mo58dj?file=/src/index.ts
The text was updated successfully, but these errors were encountered: