Getting started

pnpm create kaioken
The following example demonstrates adding Kaioken to a Vite project.

Add Kaioken and the Kaioken Vite plugin (for HMR and Devtools):

pnpm add kaioken
pnpm add vite-plugin-kaioken -D

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