Dynamic Views - Profiscience/ko-component-router GitHub Wiki

Technically, you don't have to pass a component name, instead opting to set the component dynamically...

{
  '/': (ctx) => {
    if (somethingIsTrue)
      ctx.route.component = 'component-a'
    else
      ctx.route.component = 'component-b'
  }
}