Become a member
to unlock all features

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

Create account

    More mobx-state-tree Types: map, literal, union, and enumeration


    It is time to give our wishlist app some more depth. In this lesson, we will introduce the concept of groups and users. So that we can manage multiple users inside a group that can have a wishlist. Also, we will take a quick look at powerful features like union types and type discrimination.

    In this lesson you will learn:

    • Using the type map to store data by key
    • Using literals to create single value types
    • Combining literals and unions to do type discrimination
    • Using Quokka as scratchpad for quick coding experiments
    • Using enumerations
    • Enumerations are just sugar for a union of literals