Closed dy closed 4 years ago
I apologize, now it's solved, version 0.15.4 improves the experience of web-components that extend existing elements, eg.
import { h, customElement } from "atomico";
function MyButton() {
return <host>custom button</host>;
}
export default customElement("my-button", MyButton, {
base: HTMLButtonElement,
extends: "button"
});
// import
import MyButton from "./my-button";
console.log(<MyButton></MyButton>); // <button is="my-button"></button>
The idea of importing the module and using it as jsx is to reference its origin, this is beneficial for tree-shaking and debug
Is there a source code discrepancy?