Skip to content

Instantly share code, notes, and snippets.

@blasten
Last active February 28, 2017 19:22
Show Gist options
  • Save blasten/e505f5d8406d72c4a35f2108569c2164 to your computer and use it in GitHub Desktop.
Save blasten/e505f5d8406d72c4a35f2108569c2164 to your computer and use it in GitHub Desktop.
export class SideBar extends HTMLElement {
static render({ name } = props) {
return <div>{name}</div>;
}
}
customElements.define('side-bar', SideBar);
export class ListView extends HTMLElement {
static render({ items } = props) {
return items.map(item => <side-bar name={item.name}></side-bar>);
}
}
customElements.define('list-view', ListView);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment