Why is MobX less suitable for applications that have added only a domain model?

MobX creator Michelle Westrate said:

MobX is suitable for creating any application that needs to perform CRUD like operations on a state model. It is less suitable for applications that have only a domain model added.

If I understand correctly, "add only a domain model" can refer to applications that consist of feeds / lists of data that are added continuously (for example, Facebook).

What does he mean by “adding only a domain model” and why is MobX not suitable for it?

+6
source share
1 answer

Adding only domain models never mutates the state. They just add a new state. MobX's strength lies in its ability to “watch” the state and respond when it is mutated. But since you are not mutating the state (addition only), you lose most of this power.

Still useful: if you use MobX to view “size” or “count” or something else, then you will react when these values ​​change as you add state. This is not as difficult as the simultaneous observation of 100 state objects and responding to changes in any of them.

+6
source

All Articles