Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

Dynamic Views

Casey Webb edited this page Dec 16, 2016 · 1 revision

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'
  }
}
Clone this wiki locally