myxa
v1.0.9
Published
A signal-based library that uses functional components and string templates to produce reactive DOM fragments.
Downloads
19
Readme
MYXA
Mixing together all the worst elements of the most popular frameworks to create something uniquely terrible. Why? Because I can.
Installation
Generally, using this package is a bad idea. But if you really want to, you can install it with:
npm install myxa
Or, you can use it with a CDN:
<script src="https://unpkg.com/myxa"></script>
Usage
import { Render, Mount, useSignal, Watch } from "myxa"
const App = () => {
const count = useSignal(0)
const increment = () => count.value++
const render = Render(
`
<div>
<h1>Count: ${count.value}</h1>
<button @click="increment">Increment</button>
</div>
`,
{ count, increment }
)
return Watch(render, count)
}
Mount(App, document.body)