1×
Become a member
to unlock all features

Create egghead account to access 5000+ tutorials and resources from expert developers.

Create account
Autoplay

    Attach Behavior to mobx-state-tree Models Using Actions

    reactReact
    ^16.0.0
    mobxMobX
    ^3.0.0

    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.