Rx.foreach and rx.cond with mixed var types?

That’s generally the right approach.

The code sample that I posted last week shows a nice way of encapsulating this logic Rendering different content based on a discriminator field