Software Engineer at @facebook. OSS maintainer, speaker, trainer. Author of MobX, mobx-state-tree, serializr, immer. Ex @mendix.๐จโ๐ฉโ๐งโ๐งโ๐ณ๐ฑ/๐ฌ๐ง
May 15, 2020 โข 9 tweets โข 3 min read
#MobX or @recoiljs? Saw a lot of questions on whether they're the same, so a quick thread. First of all, Recoil & MobX solve the same problem: efficient render widely shared state. This is a problem React (Context), Redux and most state management libs don't solve.
In that regard they are very similar. Hence terminology aligns: atoms, dep trees, derived data .Roughly speaking Recoil offers observable.box + computed + useObserver from MobX. A difference is that Recoil builds on React primitives, the benefits are clear: