For complex frontend applications, state management is often one of the main challenges. One common problem is to end up in erroneous states, that should not be possible to be in. Luckily we can alleviate type systems to prevent the unwanted states, and catch the errors at compile-time.
Prevent impossible states with union types
· 3 min read