MobX πŸ‡ΊπŸ‡¦

MobX πŸ‡ΊπŸ‡¦

  • API Reference
  • δΈ­ζ–‡
  • ν•œκ΅­μ–΄
  • Sponsors
  • GitHub

β€ΊIntroduction

Introduction

  • About MobX
  • About this documentation
  • Installation
  • The gist of MobX

MobX core

  • Observable state
  • Actions
  • Computeds
  • Reactions {πŸš€}
  • API

MobX and React

  • React integration
  • React optimizations {πŸš€}

Tips & Tricks

  • Defining data stores
  • Understanding reactivity
  • Subclassing
  • Analyzing reactivity {πŸš€}
  • Computeds with arguments {πŸš€}
  • MobX-utils {πŸš€}
  • Custom observables {πŸš€}
  • Lazy observables {πŸš€}
  • Collection utilities {πŸš€}
  • Intercept & Observe {πŸš€}

Fine-tuning

  • Configuration {πŸš€}
  • Decorators {πŸš€}
  • Migrating from MobX 4/5 {πŸš€}
Edit

About this documentation

It follows the principle that the most commonly used concepts are introduced before specialized information. This applies to the headings in the table of concepts as well as the pages under those headings.

We've marked the sections and concepts that are more advanced with the {πŸš€} marker. You likely won't have to understand them until you will have a special use case, and can use MobX very effectively without knowing about them. Feel free to skip them and move on to the next section!

The documentation has been rewritten for MobX 6. For older versions of MobX, it can be found here. All the principles are the same, and the API is largely the same. The main difference is that before MobX 6, decorators were the recommended syntax to write MobX enhanced classes.

A summary of the documentation can be downloaded as cheat sheet:

Guided tour

To get an overall idea of how to use MobX with React, read through the current Introduction heading, in particular The gist of MobX section. It will introduce you to the most important principles, APIs and how they relate. You should be ready to use MobX once you read this!

Here are a few suggestions about the next things to check out:

  • Try the 10 minute interactive introduction to MobX and React

  • React integration

  • makeObservable / makeAutoObservable

  • Learn about actions, which includes a discussion on asynchronous actions

  • The basics of computeds

  • Read about autorun, if only because it's used in the examples

  • To get an idea on how to organize your application's data stores, check out Defining data stores

  • If the behavior of MobX confuses you, it's useful to check out Understanding reactivity

  • Get a quick overview of the API, also linked in the top navigation bar

This should give you a good understanding of the day-to-day uses of MobX. There is plenty more available for you to read at your own leisure.

← About MobXInstallation β†’
  • Guided tour
MobX πŸ‡ΊπŸ‡¦
Docs
About MobXThe gist of MobX
Community
GitHub discussions (NEW)Stack Overflow
More
Star