1.1.3 • Published 5 years ago

@orby/custom-tag v1.1.3

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

@orby/custom-tag

Allows to encapsulate the render function of @orby/core within a web-component, allowing the reulitization of the component by invoking it in the html or within other libraries.

import {h} from "@orby/core";
import register from "@orby/custom-tag";

function MyTag(props){
    useEffect(()=>{
        console.log("web-component mounted")
        return ()=>{
            console.log("web-component dismounted")
        }
    },[]);
    return <h1>i am web-component {props.value}</h1>
}

register(<my-tag scoped props={["value"]}>{MyTag}</my-tag>)
PropertyTypeDefaultDescription
scopedbooleanfalseinitialize the component with shadow-dom
propsarray[]allows to observe the mutation of the properties associated with the web-component
1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago