Emmy.js is a tiny simple front-end library for building web applications using functional web components. It is based on the Web Components standard. It is specially designed for building web applications with server-side frameworks like Ruby on Rails, Django, Laravel, etc.
create-emmy is a command line tool that allows you to create a new emmy.js project. It is still in an experimental phase, so it is not recommended to use it in production, but you can try it out and give us your feedback. More info
import { load, html } from 'emmy-dom'
const counter = ({ el }) => {
const [count, setCount] = el.useState(0)
el.useEffect(() => {
el.querySelector('#increment').addEventListener('click', () => {
setCount(count() + 1)
})
}, [])
return () => html`
<div>
<h1>Count: ${count()}</h1>
<button id='increment'>+</button>
</div>
`
}
load(counter, 'Counter')