Lattish Documentation

The minimal runtime that powers Tish JSX. useState, createRoot, h, Fragment — everything you need to build reactive UIs with compiled Tish.

Quick Start

npm install lattish
import { useState, createRoot, h, Fragment } from 'lattish'
 
fn App() {
  let [count, setCount] = useState(0)
  return <div>
    <p>{"Count: " + String(count)}</p>
    <button onclick={() => setCount(count + 1)}>{"Increment"}</button>
  </div>
}
 
createRoot(document.getElementById("root")).render(App)

Requires the Tish compiler with --jsx lattish (default) and node_modules resolution for bare specifiers.

What is Lattish?

Lattish is the runtime for Tish JSX:

  • h, Fragment, text — DOM primitives for compiled JSX
  • createRoot — mount and re-render components
  • useState, useRef, useMemo, useEffect, useLayoutEffect — hooks API
  • Minimal bundle — no framework bloat

Documentation

SectionDescription
Installationnpm install and setup
UsageFull example and compiler requirements
Exportsh, Fragment, text, createRoot
HooksuseState, useRef, useMemo, useEffect, useLayoutEffect