@lukekaalim/act-web
v4.0.0
Published
```bash npm i @lukekaalim/act-web ```
Readme
@lukekaalim/act-web
npm i @lukekaalim/act-webimport { h, Component } from "@lukekaalim/act";
import { render } from "@lukekaalim/act-web";
const MyApp = () => {
return h('article', {}, [
h('h1', {}, "Hello, world!")
])
}
render(h(MyApp), document.body)Capabilities
- [x] Supports HTML elements and SVG elements
- [x] Add in the
web:htmlorweb:svgroot pick the correct type
- [x] Add in the
- [x] Prop support
- [x] Attributes. Most props will just be assigned directly to the element
- [x] Event Listeners.
onClickadds an event listener forclick - [x] Ref.
refwill attach aHTMLElementtoref.current - [x] Styles.
stylewill set styles directly on the element - [x] ClassList. An array of strings or falseish values will be added as classes via
classList
Builder
If you are composing another renderer and want to give it web powers, use the builder:
