What is MobX?

MobX is a library of state management that can be used with any JavaScript framework. React and MobX are powerful together and work as a complete team. MobX provides a mechanism for storing and updating the application state that React Native used to create its component. 

MobX has two main principles:

1. One-Way Data Flow (Flux If Desired)

2. Reactive

One-Way Flow :

First of all, MobX does not claim to be a freamwork based on "Flux". MobX has many writer and JS developers who will agree that it doesn't qualify as freamwork. However, there is autonomy in the structure of the data in the application. MobX offers many tools and plugins that a user can use to make their application better.

For example, unlike Redux (another popular state administration freamwork), it does not require a store to start. However, it can be done one-on-one if desired.

The three features of MobX's functionality are:

Observable: Data tracked and used in the application (or state). It can have almost any type of data structure and is usually updated by user activity. 

Observer: Makes the connection between componenes and observable. Updates the linked code when the update is made and makes it automatic.

Updates Action: State.


reagent:

MobX provides the use of derived data, not simply data. To break this expression, there is a difference between linking code together like a chain and having separate code contexts that communicate with each other.

When data is connected like a chain, each piece of code is connected and reacts to each other by default. It's like chaining up. Other state management frameworks, such as Redux, use subordial subscribers, such as the @connect function. This requires the developer to manually add data that other data is attached to within this function. Thus, we can break up contexts and "communicate" with each other.

Think of each "link" in the chain as a component. MobX encourages the use of component as much as possible. This philosophy differs fromReact and Redux. It is true that less componetin on a smaller level performs less than others like Redux, but on the contrary, MobX is more performing compared on a scale.

 

  Quote

KARABAY A, 2020 . What is MobX ?,

https://www.karabayyazilim.com/blog/javascript/mobx-nedir-2020-01-26-213643

(Accessed January 26, 2020).


  Share this post

Comments (0)

Comment

Subscribe
Sign up for the email newsletter to be the first to know about my blog posts