【文件属性】:
文件名称:js-elements:实验性小型Web组件库
文件大小:485KB
文件格式:ZIP
更新时间:2021-02-28 04:37:21
hooks webcomponents custom-elements hook-functions hooks-api
js元素
一个研发项目,用于评估组件自定义元素的替代方法。
免责声明:
项目尚处于早期状态……顺便说一句:目前,它不打算在生产中使用。
例子
例子1
import { define , h , render } from 'js-elements'
class SayHelloProps {
salutation = 'Hello'
name = 'World'
}
const SayHello = define ( 'say-hello' , SayHelloProps , ( props ) => {
return ( ) => (
< div>
{ props . salutation } , { props . name } !
< / div >
)
} )
render ( < SayHello salutation = "Hi