Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

MobX
MobX

276
217
+ 1
96
Preact
Preact

69
78
+ 1
20
Add tool

MobX vs Preact: What are the differences?

Developers describe MobX as "Simple, scalable state management". MobX is a battle tested library that makes state management simple and scalable by transparently applying functional reactive programming (TFRP). React and MobX together are a powerful combination. React renders the application state by providing mechanisms to translate it into a tree of renderable components. MobX provides the mechanism to store and update the application state that React then uses. On the other hand, Preact is detailed as "A fast 3k React alternative". Preact is an attempt to recreate the core value proposition of React (or similar libraries like Mithril) using as little code as possible, with first-class support for ES2015. Currently the library is around 3kb (minified & gzipped).

MobX can be classified as a tool in the "State Management Library" category, while Preact is grouped under "Javascript UI Libraries".

"It's just stupidly simple, yet so magical" is the primary reason why developers consider MobX over the competitors, whereas "Lightweight" was stated as the key factor in picking Preact.

MobX and Preact are both open source tools. Preact with 23.1K GitHub stars and 1.21K forks on GitHub appears to be more popular than MobX with 19.8K GitHub stars and 1.21K GitHub forks.

According to the StackShare community, MobX has a broader approval, being mentioned in 52 company stacks & 32 developers stacks; compared to Preact, which is listed in 9 company stacks and 4 developer stacks.

What is MobX?

MobX is a battle tested library that makes state management simple and scalable by transparently applying functional reactive programming (TFRP). React and MobX together are a powerful combination. React renders the application state by providing mechanisms to translate it into a tree of renderable components. MobX provides the mechanism to store and update the application state that React then uses.

What is Preact?

Preact is an attempt to recreate the core value proposition of React (or similar libraries like Mithril) using as little code as possible, with first-class support for ES2015. Currently the library is around 3kb (minified & gzipped).
Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

Why do developers choose MobX?
Why do developers choose Preact?

Sign up to add, upvote and see more prosMake informed product decisions

    Be the first to leave a con
    What companies use MobX?
    What companies use Preact?

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with MobX?
    What tools integrate with Preact?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    What are some alternatives to MobX and Preact?
    Relay
    Never again communicate with your data store using an imperative API. Simply declare your data requirements using GraphQL and let Relay figure out how and when to fetch your data.
    KnockoutJS
    Knockout is a JavaScript MVVM (a modern variant of MVC) library that makes it easier to create rich, desktop-like user interfaces with JavaScript and HTML. It uses observers to make your UI automatically stay in sync with an underlying data model, along with a powerful and extensible set of declarative bindings to enable productive development.
    GraphQL Cache
    A custom middleware for graphql-ruby that handles key construction and cache reads/writes transparently.
    Flux
    Flux is the application architecture that Facebook uses for building client-side web applications. It complements React's composable view components by utilizing a unidirectional data flow. It's more of a pattern rather than a formal framework, and you can start using Flux immediately without a lot of new code.
    Apollo
    Build a universal GraphQL API on top of your existing REST APIs, so you can ship new application features fast without waiting on backend changes.
    See all alternatives
    Decisions about MobX and Preact
    Dmitry Mukhin
    Dmitry Mukhin
    at Uploadcare | 22 upvotes 204.8K views
    atUploadcareUploadcare
    PostCSS
    PostCSS
    Preact
    Preact
    Ember.js
    Ember.js
    React
    React
    Python
    Python
    Django
    Django

    Simple controls over complex technologies, as we put it, wouldn't be possible without neat UIs for our user areas including start page, dashboard, settings, and docs.

    Initially, there was Django. Back in 2011, considering our Python-centric approach, that was the best choice. Later, we realized we needed to iterate on our website more quickly. And this led us to detaching Django from our front end. That was when we decided to build an SPA.

    For building user interfaces, we're currently using React as it provided the fastest rendering back when we were building our toolkit. It鈥檚 worth mentioning Uploadcare is not a front-end-focused SPA: we aren鈥檛 running at high levels of complexity. If it were, we鈥檇 go with Ember.js.

    However, there's a chance we will shift to the faster Preact, with its motto of using as little code as possible, and because it makes more use of browser APIs. One of our future tasks for our front end is to configure our Webpack bundler to split up the code for different site sections. For styles, we use PostCSS along with its plugins such as cssnano which minifies all the code.

    All that allows us to provide a great user experience and quickly implement changes where they are needed with as little code as possible.

    See more
    Gianluca Bargelli
    Gianluca Bargelli
    MobX
    MobX
    Redux
    Redux
    AngularJS
    AngularJS
    React
    React

    We started rebuilding our dashboard components using React from AngularJS over 3 years ago and, in order to have predictable client-side state management we introduced Redux.js inside our stack because of the popularity it gained inside the JavaScript community; that said, the number of lines of codes needed to implement even the simplest form was unnecessarily high, from a simple form to a more complex component like our team management page.

    By switching our state management to MobX we removed approximately 40% of our boilerplate code and simplified our front-end development flow, which in the ends allowed us to focus more into product features rather than architectural choices.

    See more
    John Barton
    John Barton
    Founder at Hecate | 7 upvotes 30.7K views
    atHecateHecate
    Material-UI
    Material-UI
    Go
    Go
    PostgreSQL
    PostgreSQL
    Rails
    Rails
    MobX
    MobX
    Redux
    Redux
    React
    React

    Frontend choice was basically pre-ordained to be React. Seems like a strong choice on merits alone, plus I needed to learn it to stay current. I never liked Redux.js from the first time I tried to work with it, but a mate had recommended MobX and after watching a few videos I felt like I could fit the mental model of hit in my head. Using Material-UI which is a great timesaver and make sure I throw a few bucks their way every month via the open source collective.

    Defaulted to Rails with PostgreSQL just because that's where my past strength as a dev had been. First prototype was in Go but was struggling a bit with the quality of libraries I needed so I went back to old faithful.

    As soon as TypeScript was supported by default in Create React App I ported everything over. That combined with swagger code gen has given me really good type safety from the API boundary and above. I semi-regret the Go/Rails decision because I miss the type safety despite pain points with libraries.

    I will probably look to flip back to Go gradually (probably via lambda) at a point where it makes sense for the business.

    See more
    Riderman De Sousa Barbosa
    Riderman De Sousa Barbosa
    Front-end Developer | 5 upvotes 11.9K views
    atmeve.aimeve.ai
    React
    React
    Preact
    Preact

    The first and most important premise is that should be fast.. really fast. This premise was basically because this is an PWA project, and the main goal of this project are be more efficient on restaurant.

    So I ended up choosing Preact instead React .

    This made the app (PWA) more faster, not only when navigating but improve TTI and data usage.

    See more
    Interest over time
    Reviews of MobX and Preact
    No reviews found
    How developers use MobX and Preact
    Avatar of Bermuda Digital Studio
    Bermuda Digital Studio uses MobXMobX

    Substate Management and MVVM adoption

    How much does MobX cost?
    How much does Preact cost?
    Pricing unavailable
    Pricing unavailable
    News about MobX
    More news
    News about Preact
    More news