Christos Sotiriou
1 min readJan 6, 2019

--

No, I haven’t.

Actually, I chose Mobx because it allowed me to have even better integration with the Realm database I was already using.

My data was coming from a realm database, which changed due to real-time updates. Those data ended up being aggregated and sections were produced.

Storing Realm data in Redux is a huge performance bottleneck — Redux will try to access the properties of an object it holds, and that will trigger live queries in the database (since properties of Realm objects are actually live queries ready to be made when accessors are hit).

Mobx allowed me to avoid this by allowing “surgical” operations in observable arrays, which were made better by using Realm’s observed collections (which give you information about what indexes were added and removed). My aggregated objects were at least 100.

In short, what saved the day was that Mobx allowed operations on mutable arrays.

Reselect is a good choice — but not for my use case.

--

--

Christos Sotiriou

Principal Software Engineer, currently @ Vodafone GR. Crafting apps & web services since 2007. https://oramind.com