You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And in my case the prepareNewValue() indeed returned UNCHANGED, but it didn't equal even though my newValue was the same as current value.
Look:
I stored the other UNCHANGED on my window and that equaled.
The reason why it doesn't equal is that I used npm link to load up a different version of mobx. And since webpack then loads multiple modules of mobx, when you use a set from one on another it just does really weird stuff.
Worst thing is-not even a peer dependency helps. @mweststrate wasn't there some kind of warning when you loaded up multiple mobx modules at once?
The text was updated successfully, but these errors were encountered:
@capaj I think this one could be fixed by storing UNCHANGED on the global state object instead of having it as module constant. Note that it might not be the last of your issues though, and if you could prevent linking / multiple instances that would be better :)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or questions.
lockbot
locked as resolved and limited conversation to collaborators
Jul 21, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
So I was having a fun afternoon trying to figure out why mu observable is being populated with an empty object instead of my value when I call
set()
.There is this
UNCHANGED
mobx/src/types/observablevalue.ts
Line 36 in f944b54
which is being compared to a
newValue
here:mobx/src/types/observablemap.ts
Lines 185 to 187 in f944b54
And in my case the
prepareNewValue()
indeed returnedUNCHANGED
, but it didn't equal even though my newValue was the same as current value.Look:
I stored the other
UNCHANGED
on my window and that equaled.The reason why it doesn't equal is that I used
npm link
to load up a different version of mobx. And since webpack then loads multiple modules of mobx, when you use aset
from one on another it just does really weird stuff.Worst thing is-not even a peer dependency helps.
@mweststrate wasn't there some kind of warning when you loaded up multiple mobx modules at once?
The text was updated successfully, but these errors were encountered: