• Stars
    star
    284
  • Rank 145,616 (Top 3 %)
  • Language
    HTML
  • License
    MIT License
  • Created over 8 years ago
  • Updated about 6 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,520
star
2

mobx-state-tree

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

mobx-react

React bindings for MobX
TypeScript
4,856
star
4

mobx.dart

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

awesome-mobx

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

mobx-react-lite

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

mobx-react-devtools

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

mobx-utils

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

mobx-react-boilerplate

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

serializr

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

mst-gql

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

mobx-react-todomvc

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

mobx-devtools

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

mobx-angular

The MobX connector for Angular.
TypeScript
482
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
126
star
18

babel-plugin-mobx-deep-action

Reduces `action` and `runInAction` boilerplates
JavaScript
107
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
76
star
21

mobx-vue-lite

Lightweight Vue 3 bindings for MobX based on Composition API.
TypeScript
69
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
40
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