Imba integration with pro-router.js
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
280 B

tag router
prop component watch: yes
def setup
@component = null
@cache = {}
def componentDidSet val, prev
removeChild(prev) if prev
appendChild(val) if val
self
def render
component = @cache[@data] ||= Imba.createElement(@data,null,null,self)
component.end