1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

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

    reactReact
    ^16.0.0
    mobxMobX
    ^3.0.0

    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