Let's say I want to render a todo list with various types of todos: singleton tasks, nested tasks, checklists, ... with each type having common & type-specific state/behaviour.
To model these, my mind goes to a separate state, view, and reducer for each type. Where I get stuck is how to express this polymorphism when I want to store an array of heterogeneous todos to render them all in a list. I'd need to maintain a state tree with different types of nodes, wrap the actions for the different types, and combine the appropriate reducers. I reached for a protocol, but quickly ran into the usual PAT issues when I make each todo's action and state an associated type.
Is there a pattern for handling this in TCA?