1×
Become a member
to unlock all features

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

Create account
Autoplay

    Create Dynamic Types and use Type Composition to Extract Common Functionality

    reactReact
    ^16.0.0
    mobxMobX
    ^3.0.0

    Since MST offers a runtime type system, it can create and compose types on the fly, making it possible to reuse logic in new and powerful ways.

    In this lesson you will learn:

    • That MST types are immutable and composed together behind the scenes
    • How to compose types explicitly by using types.compose
    • How to create dynamic, parameterized types by leveraging that MST types are first class javascript citizens