Skip to content

Instantly share code, notes, and snippets.

@UpperCod
Last active February 11, 2021 03:02
Show Gist options
  • Save UpperCod/27d744e9c4c95e59041e1d909e3bced9 to your computer and use it in GitHub Desktop.
Save UpperCod/27d744e9c4c95e59041e1d909e3bced9 to your computer and use it in GitHub Desktop.
designed for webcomponents
function component() {
const sayHello = () => {
console.log("hi!");
};
const handlerClick = () => {
console.log("click");
};
return (
<host shadowDom sayHello={sayHello} onclick={handlerClick}>
<slot></slot>
</host>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment