choojs / hyperx

🏷 - tagged template string virtual dom builder
BSD 2-Clause "Simplified" License
1.01k stars 48 forks source link

Add support for custom components as variables #68

Closed diffcunha closed 6 years ago

diffcunha commented 6 years ago

This PR adds the feature to set tags as variables.

Fixes: #67 Related to: #9

class Component extends HTMLElement { ... }
const tree = hx`
  <${Component} arg1="foo">
    <span>child</span>
  </${Component}>
`
yoshuawuyts commented 6 years ago

v2.4.0 :tada: