Go ProSign in

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

Michel WeststrateMichel Weststrate
5:39

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

You must be a Member to view code