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
Please take a moment to tell your friends:

You must be a PRO Member to view code