• Stars
    star
    285
  • Rank 139,902 (Top 3 %)
  • Language
    HTML
  • License
    MIT License
  • Created almost 8 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A collection of simple mobx examples

mobx-examples

A collection of simple mobx examples. All the examples below have been written in ES5 without JSX. No transpiling required. Please feel free to make any suggestions for improvement.

Baseline JSFiddle Includes: React, lodash, mobx, mobxReact, and mobxDevtools.

Baseline JSFiddle with decorators Includes: React, mobx, mobxReact. Thanks @spion!

MobX stand-alone examples

Please note that I have created a console.log override that prints the console.logs out to the results window on JSFiddle.

Creating Observables

Reactions

Computed Values

  • computed
    Note how the computed fullName is cached.

Actions

  • action
    Non-strict action usage. You may still set values outside of the actions.

  • action strict mode
    Strict action usage. OPEN YOUR CONSOLE. You should see an error where I try to set firstName directly. Note how easy it is to see the cause in the stack.

Utils

React + MobX examples

More Repositories

1

mobx

Simple, scalable state management.
TypeScript
27,224
star
2

mobx-state-tree

Full-featured reactive state management without the boilerplate
TypeScript
6,867
star
3

mobx-react

React bindings for MobX
TypeScript
4,864
star
4

mobx.dart

MobX for the Dart language. Hassle-free, reactive state-management for your Dart and Flutter apps.
Dart
2,365
star
5

awesome-mobx

A collection of awesome things regarding MobX.
2,176
star
6

mobx-react-lite

Lightweight React bindings for MobX based on React 16.8 and Hooks
TypeScript
2,131
star
7

mobx-react-devtools

[DEPRECATED] Tools to perform runtime analyses of React applications powered by MobX and React
JavaScript
1,228
star
8

mobx-utils

Utility functions and common patterns for MobX
TypeScript
1,168
star
9

mobx-react-boilerplate

Small project to quickly start with React, MobX, JSX, ES6, Babel
JavaScript
895
star
10

serializr

Serialize and deserialize complex object graphs to and from JSON and Javascript classes
TypeScript
760
star
11

mst-gql

Bindings for mobx-state-tree and GraphQL
JavaScript
676
star
12

mobx-react-todomvc

TodoMVC reference implementation on top of react-mobx-boilerplate
JavaScript
501
star
13

mobx-angular

The MobX connector for Angular.
TypeScript
479
star
14

mobx-devtools

Mobx Devtools (React, Chrome Extension) - Looking for maintainers! https://github.com/mobxjs/mobx-devtools/issues/55
JavaScript
479
star
15

mobx-vue

🐉 Vue bindings for MobX
TypeScript
475
star
16

create-react-app-mobx

DEPRECATED. Use https://github.com/arackaf/customize-cra
JavaScript
146
star
17

mobx-preact

MobX bindings for Preact
JavaScript
125
star
18

babel-plugin-mobx-deep-action

Reduces `action` and `runInAction` boilerplates
JavaScript
109
star
19

mobx-reactive2015-demo

Runnable source code of the #GoReactive #mobservable talk
JavaScript
98
star
20

mobx-contacts-list

React Amsterdam 2016 Demo Project
JavaScript
77
star
21

mobx-vue-lite

Lightweight Vue 3 bindings for MobX based on Composition API.
TypeScript
64
star
22

mobx-angularjs

MobX connector to AngularJS
TypeScript
51
star
23

mobx-react-docz

DEPRECATED Documentation site for MobX in React
TypeScript
42
star
24

zh.mobx.js.org

Mobx中文文档
HTML
39
star
25

ko.mobx.js.org

Mobx korean document
HTML
11
star
26

mobxjs.github.io

Redir to mobx documentation
HTML
1
star
27

.github

1
star
28

mst-codemod-to-0.10

A codemod to migrate to MobX-State-Tree 0.10 from previous versions
TypeScript
1
star
29

mobx-fiddle-baseline

JavaScript
1
star