Getting started
npx create-kaioken@latest
The following example demonstrates adding Kaioken to a Vite project.
Add Kaioken and the Kaioken Vite plugin (for HMR):
npm install kaioken
npm install vite-plugin-kaioken --save-dev
Update your vite.config.ts (or add it in the top level of your project) and add the HMR plugin:
import { defineConfig } from "vite"
import kaioken from "vite-plugin-kaioken"
export default defineConfig({
plugins: [kaioken()],
})
Add the "jsx" entry in your tsconfig.json:
{
"compilerOptions": {
...
"jsx": "preserve"
...
}
}
Create a simple app:
export function App() {
return <h1>Hello world!</h1>
}
Mount your app to the DOM:
import { mount } from "kaioken"
import { App } from "./App"
const root = document.getElementById("app")
mount(App, root)
Reach out to us or get involved on Discord