microsoft/satcheljs

mobx / mobx-react should be peerDependencies?

Closed this issue · 4 comments

ReedD commented

So I followed the README and installed mobx and mobx-react as directed and wired up my components as shown in the examples, however, any attempt at updating my store seemed to do nothing and my components failed to re-render... Took me a while to figure out but satcheljs has mobx and mobx-react as dependencies with versions set at ~2.6.5 and ~4.0.3 respectively. The disconnect occurred because when installing mobx with npm or yarn it installs version 3.x.x and thus my code and satcheljs's code were using different versions of mobx. Seems like they should be peerDependencies instead to avoid this problem, no? Looks like this may have already come up before as noted by @kenotron in issue #31.

this is an real blocker for me. since typing are not resolved when for example using computed from satcheljs mobx

I believe mobx should really be a peer dep - agreed.

Yep, I've been meaning to do this. Simple fix: #86.

Fixed in #86 and included in the v3.1.0 release.