- 🌞 JSX that returns nodes
- 💎 Supports Attributes & Events
- 🎉 No Virtual DOM
- ⚡ Small bundle size (285 B)
npx create-solojsx-app
npx create-solojsx-app project-name
bunx create-solojsx-app-bun
bunx create-solojsx-app-bun project-name
import solojsx from 'solojsx'
const element = (
<div>
<h1>SoloJSX</h1>
<p>SoloJSX is a library that returns nodes from JSX</p>
</div>
)
document.body.appendChild(element)
const fun = (text: string) => alert(text)
const e = <div style="color: red" onclick={() => fun("Hi")}>Click Me</div>
const e = <div>
{[1, 2, 3].map(i => <div>{i}</div>)}
</div>
const e = <div>
{true ? <div>Hello</div> : []}
</div>
const inner = <div>Hello</div>
const e = <div>{inner}</div>
MIT