- Published on
- 2 min read
Use a discriminated union to make loading, success and failure explicit and exhaustive.
Use a discriminated union to make loading, success and failure explicit and exhaustive.
Place each piece of state near the components that need to coordinate, and derive what you can.