Alternatives to MobX logo

Alternatives to MobX

Relay Framework, Knockout, GraphQL Cache, Flux, and Apollo are the most popular alternatives and competitors to MobX.
748
515
+ 1
114

What is MobX and what are its top alternatives?

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.
MobX is a tool in the State Management Library category of a tech stack.
MobX is an open source tool with 27.6K GitHub stars and 1.8K GitHub forks. Here’s a link to MobX's open source repository on GitHub

Top Alternatives to MobX

  • Relay Framework
    Relay Framework

    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. ...

  • Knockout
    Knockout

    It is a JavaScript library that helps you to create rich, responsive display and editor user interfaces with a clean underlying data model. Any time you have sections of UI that update dynamically (e.g., changing depending on the user’s actions or when an external data source changes), it can help you implement it more simply and maintainably. ...

  • GraphQL Cache
    GraphQL Cache

    A custom middleware for graphql-ruby that handles key construction and cache reads/writes transparently. ...

  • Flux
    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
    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. ...

  • vuex
    vuex

    Vuex is a state management pattern + library for Vue.js applications. It serves as a centralized store for all the components in an application, with rules ensuring that the state can only be mutated in a predictable fashion. It also integrates with Vue's official devtools extension to provide advanced features such as zero-config time-travel debugging and state snapshot export / import. ...

  • RxJS
    RxJS

    RxJS is a library for reactive programming using Observables, to make it easier to compose asynchronous or callback-based code. This project is a rewrite of Reactive-Extensions/RxJS with better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface. ...

  • React
    React

    Lots of people use React as the V in MVC. Since React makes no assumptions about the rest of your technology stack, it's easy to try it out on a small feature in an existing project. ...

MobX alternatives & related posts

Relay Framework logo

Relay Framework

206
1
A JavaScript Framework for Building Data-Driven React Applications, by Facebook
206
1
PROS OF RELAY FRAMEWORK
  • 1
    Relay Modern
CONS OF RELAY FRAMEWORK
    Be the first to leave a con

    related Relay Framework posts

    Zach Holman

    Apollo is my favorite open source project.

    Two things you need to worry about when making a statement like that: is the tool good, and how is the tool being built?

    From a tool perspective... yeah, Apollo is great. I'm convinced that GraphQL is the way forward for me, and Apollo's just a great way to tackle it. Even beyond that, it just offers a good mentality to how you should build your database-backed app. I've used Relay in the past, back before they made a bunch of changes with Relay Modern (which all seem positive!), but switching to Apollo is just night-and-day. They've been doing better in the last 12 months or so at making smart abstractions in the React Apollo library, to the point where I'd just get these monster all-red pull requests where I can delete all my cruddy code and replace it with far fewer lines of their great abstractions.

    But from a build perspective... Apollo fares even better, I think. By this, I mean their project inertia, their progress, their ability to ship stable code — but still ship meaningful new functionality, too. They're not afraid to move their ideas in other directions (integrating with React Native, for example). Kills me to see projects that are just heads-down on their little world as the world passes them by, and so far... yeah, Apollo's been on top of it.

    Anyway, big fan. It's really changed how I write frontend code, and I feel hella confident while working with it.

    See more
    Knockout logo

    Knockout

    253
    6
    Create rich, responsive UIs with JavaScript
    253
    6
    PROS OF KNOCKOUT
    • 3
      Data centered application
    • 2
      Great for validations
    • 1
      Open source
    CONS OF KNOCKOUT
      Be the first to leave a con

      related Knockout posts

      GraphQL Cache logo

      GraphQL Cache

      23
      0
      A custom caching plugin for graphql-ruby
      23
      0
      PROS OF GRAPHQL CACHE
        Be the first to leave a pro
        CONS OF GRAPHQL CACHE
          Be the first to leave a con

          related GraphQL Cache posts

          Flux logo

          Flux

          519
          130
          Application Architecture for Building User Interfaces
          519
          130
          PROS OF FLUX
          • 44
            Unidirectional data flow
          • 32
            Architecture
          • 19
            Structure and Data Flow
          • 14
            Not MVC
          • 12
            Open source
          • 6
            Created by facebook
          • 3
            A gestalt shift
          CONS OF FLUX
            Be the first to leave a con

            related Flux posts

            Marcos Iglesias
            Sr. Software Engineer at Eventbrite · | 13 upvotes · 225K views

            We are in the middle of a change of the stack on the front end. So we used Backbone.js with Marionette. Then we also created our own implementation of a Flux kind of flow. We call it eb-flux. We have worked with Marionette for a long time. Then at some point we start evolving and end up having a kind of Redux.js-style architecture, but with Marionette.

            But then maybe one and a half years ago, we started moving into React and that's why we created the Eventbrite design system. It's a really nice project that probably could be open sourced. It's a library of components for our React components.

            With the help of that library, we are building our new stack with React and sometimes Redux when it's necessary.

            See more
            Apollo logo

            Apollo

            2.4K
            25
            GraphQL server for Express, Connect, Hapi, Koa and more
            2.4K
            25
            PROS OF APOLLO
            • 12
              From the creators of Meteor
            • 8
              Great documentation
            • 3
              Open source
            • 2
              Real time if use subscription
            CONS OF APOLLO
            • 1
              File upload is not supported
            • 1
              Increase in complexity of implementing (subscription)

            related Apollo posts

            Nick Rockwell
            SVP, Engineering at Fastly · | 46 upvotes · 4.1M views

            When I joined NYT there was already broad dissatisfaction with the LAMP (Linux Apache HTTP Server MySQL PHP) Stack and the front end framework, in particular. So, I wasn't passing judgment on it. I mean, LAMP's fine, you can do good work in LAMP. It's a little dated at this point, but it's not ... I didn't want to rip it out for its own sake, but everyone else was like, "We don't like this, it's really inflexible." And I remember from being outside the company when that was called MIT FIVE when it had launched. And been observing it from the outside, and I was like, you guys took so long to do that and you did it so carefully, and yet you're not happy with your decisions. Why is that? That was more the impetus. If we're going to do this again, how are we going to do it in a way that we're gonna get a better result?

            So we're moving quickly away from LAMP, I would say. So, right now, the new front end is React based and using Apollo. And we've been in a long, protracted, gradual rollout of the core experiences.

            React is now talking to GraphQL as a primary API. There's a Node.js back end, to the front end, which is mainly for server-side rendering, as well.

            Behind there, the main repository for the GraphQL server is a big table repository, that we call Bodega because it's a convenience store. And that reads off of a Kafka pipeline.

            See more
            Adam Neary

            At Airbnb we use GraphQL Unions for a "Backend-Driven UI." We have built a system where a very dynamic page is constructed based on a query that will return an array of some set of possible “sections.” These sections are responsive and define the UI completely.

            The central file that manages this would be a generated file. Since the list of possible sections is quite large (~50 sections today for Search), it also presumes we have a sane mechanism for lazy-loading components with server rendering, which is a topic for another post. Suffice it to say, we do not need to package all possible sections in a massive bundle to account for everything up front.

            Each section component defines its own query fragment, colocated with the section’s component code. This is the general idea of Backend-Driven UI at Airbnb. It’s used in a number of places, including Search, Trip Planner, Host tools, and various landing pages. We use this as our starting point, and then in the demo show how to (1) make and update to an existing section, and (2) add a new section.

            While building your product, you want to be able to explore your schema, discovering field names and testing out potential queries on live development data. We achieve that today with GraphQL Playground, the work of our friends at #Prisma. The tools come standard with Apollo Server.

            #BackendDrivenUI

            See more
            vuex logo

            vuex

            1.5K
            7
            Centralized State Management for Vue.js.
            1.5K
            7
            PROS OF VUEX
            • 2
              Debugging
            • 2
              Zero-config time-travel
            • 2
              Centralized State Management
            • 1
              Easy to setup
            CONS OF VUEX
              Be the first to leave a con

              related vuex posts

              Simon Reymann
              Senior Fullstack Developer at QUANTUSflow Software GmbH · | 24 upvotes · 4.9M views

              Our whole Vue.js frontend stack (incl. SSR) consists of the following tools:

              • Nuxt.js consisting of Vue CLI, Vue Router, vuex, Webpack and Sass (Bundler for HTML5, CSS 3), Babel (Transpiler for JavaScript),
              • Vue Styleguidist as our style guide and pool of developed Vue.js components
              • Vuetify as Material Component Framework (for fast app development)
              • TypeScript as programming language
              • Apollo / GraphQL (incl. GraphiQL) for data access layer (https://apollo.vuejs.org/)
              • ESLint, TSLint and Prettier for coding style and code analyzes
              • Jest as testing framework
              • Google Fonts and Font Awesome for typography and icon toolkit
              • NativeScript-Vue for mobile development

              The main reason we have chosen Vue.js over React and AngularJS is related to the following artifacts:

              • Empowered HTML. Vue.js has many similar approaches with Angular. This helps to optimize HTML blocks handling with the use of different components.
              • Detailed documentation. Vue.js has very good documentation which can fasten learning curve for developers.
              • Adaptability. It provides a rapid switching period from other frameworks. It has similarities with Angular and React in terms of design and architecture.
              • Awesome integration. Vue.js can be used for both building single-page applications and more difficult web interfaces of apps. Smaller interactive parts can be easily integrated into the existing infrastructure with no negative effect on the entire system.
              • Large scaling. Vue.js can help to develop pretty large reusable templates.
              • Tiny size. Vue.js weights around 20KB keeping its speed and flexibility. It allows reaching much better performance in comparison to other frameworks.
              See more
              Tim Nolet

              Heroku Docker GitHub Node.js hapi Vue.js AWS Lambda Amazon S3 PostgreSQL Knex.js Checkly is a fairly young company and we're still working hard to find the correct mix of product features, price and audience.

              We are focussed on tech B2B, but I always wanted to serve solo developers too. So I decided to make a $7 plan.

              Why $7? Simply put, it seems to be a sweet spot for tech companies: Heroku, Docker, Github, Appoptics (Librato) all offer $7 plans. They must have done a ton of research into this, so why not piggy back that and try it out.

              Enough biz talk, onto tech. The challenges were:

              • Slice of a portion of the functionality so a $7 plan is still profitable. We call this the "plan limits"
              • Update API and back end services to handle and enforce plan limits.
              • Update the UI to kindly state plan limits are in effect on some part of the UI.
              • Update the pricing page to reflect all changes.
              • Keep the actual processing backend, storage and API's as untouched as possible.

              In essence, we went from strictly volume based pricing to value based pricing. Here come the technical steps & decisions we made to get there.

              1. We updated our PostgreSQL schema so plans now have an array of "features". These are string constants that represent feature toggles.
              2. The Vue.js frontend reads these from the vuex store on login.
              3. Based on these values, the UI has simple v-if statements to either just show the feature or show a friendly "please upgrade" button.
              4. The hapi API has a hook on each relevant API endpoint that checks whether a user's plan has the feature enabled, or not.

              Side note: We offer 10 SMS messages per month on the developer plan. However, we were not actually counting how many people were sending. We had to update our alerting daemon (that runs on Heroku and triggers SMS messages via AWS SNS) to actually bump a counter.

              What we build is basically feature-toggling based on plan features. It is very extensible for future additions. Our scheduling and storage backend that actually runs users' monitoring requests (AWS Lambda) and stores the results (S3 and Postgres) has no knowledge of all of this and remained unchanged.

              Hope this helps anyone building out their SaaS and is in a similar situation.

              See more
              RxJS logo

              RxJS

              2.1K
              21
              The Reactive Extensions for JavaScript
              2.1K
              21
              PROS OF RXJS
              • 6
                Easier async data chaining and combining
              • 3
                Steep learning curve, but offers predictable operations
              • 2
                Observable subjects
              • 2
                Ability to build your own stream
              • 2
                Works great with any state management implementation
              • 2
                Easier testing
              • 1
                Lot of build-in operators
              • 1
                Simplifies state management
              • 1
                Great for push based architecture
              • 1
                Documentation
              CONS OF RXJS
              • 3
                Steep learning curve

              related RxJS posts

              Eyas Sharaiha
              Software Engineer at Google · | 28 upvotes · 1.1M views
              Shared insights
              on
              TypeScriptTypeScriptAngularAngularRxJSRxJS
              at

              One TypeScript / Angular 2 code health recommendation at Google is how to simplify dealing with RxJS Observables. Two common options in Angular are subscribing to an Observable inside of a Component's TypeScript code, versus using something like the AsyncPipe (foo | async) from the template html. We typically recommend the latter for most straightforward use cases (code without side effects, etc.)

              I typically review a fair amount of Angular code at work. One thing I typically encourage is using plain Observables in an Angular Component, and using AsyncPipe (foo | async) from the template html to handle subscription, rather than directly subscribing to an observable in a component TS file.

              Subscribing in components

              Unless you know a subscription you're starting in a component is very finite (e.g. an HTTP request with no retry logic, etc), subscriptions you make in a Component must:

              1. Be closed, stopped, or cancelled when exiting a component (e.g. when navigating away from a page),
              2. Only be opened (subscribed) when a component is actually loaded/visible (i.e. in ngOnInit rather than in a constructor).

              AsyncPipe can take care of that for you

              Instead of manually implementing component lifecycle hooks, remembering to subscribe and unsubscribe to an Observable, AsyncPipe can do that for you.

              I'm sharing a version of this recommendation with some best practices and code samples.

              #Typescript #Angular #RXJS #Async #Frontend

              See more
              Praveen Mooli
              Engineering Manager at Taylor and Francis · | 19 upvotes · 4M views

              We are in the process of building a modern content platform to deliver our content through various channels. We decided to go with Microservices architecture as we wanted scale. Microservice architecture style is an approach to developing an application as a suite of small independently deployable services built around specific business capabilities. You can gain modularity, extensive parallelism and cost-effective scaling by deploying services across many distributed servers. Microservices modularity facilitates independent updates/deployments, and helps to avoid single point of failure, which can help prevent large-scale outages. We also decided to use Event Driven Architecture pattern which is a popular distributed asynchronous architecture pattern used to produce highly scalable applications. The event-driven architecture is made up of highly decoupled, single-purpose event processing components that asynchronously receive and process events.

              To build our #Backend capabilities we decided to use the following: 1. #Microservices - Java with Spring Boot , Node.js with ExpressJS and Python with Flask 2. #Eventsourcingframework - Amazon Kinesis , Amazon Kinesis Firehose , Amazon SNS , Amazon SQS, AWS Lambda 3. #Data - Amazon RDS , Amazon DynamoDB , Amazon S3 , MongoDB Atlas

              To build #Webapps we decided to use Angular 2 with RxJS

              #Devops - GitHub , Travis CI , Terraform , Docker , Serverless

              See more
              React logo

              React

              173.4K
              4.1K
              A JavaScript library for building user interfaces
              173.4K
              4.1K
              PROS OF REACT
              • 832
                Components
              • 673
                Virtual dom
              • 578
                Performance
              • 508
                Simplicity
              • 442
                Composable
              • 186
                Data flow
              • 166
                Declarative
              • 128
                Isn't an mvc framework
              • 120
                Reactive updates
              • 115
                Explicit app state
              • 50
                JSX
              • 29
                Learn once, write everywhere
              • 22
                Easy to Use
              • 21
                Uni-directional data flow
              • 17
                Works great with Flux Architecture
              • 11
                Great perfomance
              • 10
                Javascript
              • 9
                Built by Facebook
              • 8
                TypeScript support
              • 6
                Server Side Rendering
              • 6
                Speed
              • 5
                Feels like the 90s
              • 5
                Excellent Documentation
              • 5
                Props
              • 5
                Functional
              • 5
                Easy as Lego
              • 5
                Closer to standard JavaScript and HTML than others
              • 5
                Cross-platform
              • 5
                Easy to start
              • 5
                Hooks
              • 5
                Awesome
              • 5
                Scalable
              • 4
                Super easy
              • 4
                Allows creating single page applications
              • 4
                Server side views
              • 4
                Sdfsdfsdf
              • 4
                Start simple
              • 4
                Strong Community
              • 4
                Fancy third party tools
              • 4
                Scales super well
              • 3
                Has arrow functions
              • 3
                Beautiful and Neat Component Management
              • 3
                Just the View of MVC
              • 3
                Simple, easy to reason about and makes you productive
              • 3
                Fast evolving
              • 3
                SSR
              • 3
                Great migration pathway for older systems
              • 3
                Rich ecosystem
              • 3
                Simple
              • 3
                Has functional components
              • 3
                Every decision architecture wise makes sense
              • 3
                Very gentle learning curve
              • 2
                Split your UI into components with one true state
              • 2
                Image upload
              • 2
                Permissively-licensed
              • 2
                Fragments
              • 2
                Sharable
              • 2
                Recharts
              • 2
                HTML-like
              • 1
                React hooks
              • 1
                Datatables
              CONS OF REACT
              • 41
                Requires discipline to keep architecture organized
              • 30
                No predefined way to structure your app
              • 29
                Need to be familiar with lots of third party packages
              • 13
                JSX
              • 10
                Not enterprise friendly
              • 6
                One-way binding only
              • 3
                State consistency with backend neglected
              • 3
                Bad Documentation
              • 2
                Error boundary is needed
              • 2
                Paradigms change too fast

              related React posts

              Johnny Bell

              I was building a personal project that I needed to store items in a real time database. I am more comfortable with my Frontend skills than my backend so I didn't want to spend time building out anything in Ruby or Go.

              I stumbled on Firebase by #Google, and it was really all I needed. It had realtime data, an area for storing file uploads and best of all for the amount of data I needed it was free!

              I built out my application using tools I was familiar with, React for the framework, Redux.js to manage my state across components, and styled-components for the styling.

              Now as this was a project I was just working on in my free time for fun I didn't really want to pay for hosting. I did some research and I found Netlify. I had actually seen them at #ReactRally the year before and deployed a Gatsby site to Netlify already.

              Netlify was very easy to setup and link to my GitHub account you select a repo and pretty much with very little configuration you have a live site that will deploy every time you push to master.

              With the selection of these tools I was able to build out my application, connect it to a realtime database, and deploy to a live environment all with $0 spent.

              If you're looking to build out a small app I suggest giving these tools a go as you can get your idea out into the real world for absolutely no cost.

              See more
              Collins Ogbuzuru
              Front-end dev at Evolve credit · | 38 upvotes · 269.5K views

              Your tech stack is solid for building a real-time messaging project.

              React and React Native are excellent choices for the frontend, especially if you want to have both web and mobile versions of your application share code.

              ExpressJS is an unopinionated framework that affords you the flexibility to use it's features at your term, which is a good start. However, I would recommend you explore Sails.js as well. Sails.js is built on top of Express.js and it provides additional features out of the box, especially the Websocket integration that your project requires.

              Don't forget to set up Graphql codegen, this would improve your dev experience (Add Typescript, if you can too).

              I don't know much about databases but you might want to consider using NO-SQL. I used Firebase real-time db and aws dynamo db on a few of my personal projects and I love they're easy to work with and offer more flexibility for a chat application.

              See more