Go ProSign in

Attach Behavior to mobx-state-tree Models Using Actions

Models are not just a nifty feature for type checking. They enable you to attach behavior to your actions in a straightforward and highly discoverable way

In this lesson, you will learn:

  • How to define actions on models
  • How to avoid this issues by using self
  • Models can only be modified using actions, and are further read-only from the outside

To learn more about TypeScript check out John Lindquist's wonderful course, Up and Running with TypeScript.

You must be a Member to view code