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 @tishlang/lattish
import { useState, createRoot, h, Fragment } from '@tishlang/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 and node_modules resolution for bare specifiers. JSX support is built in — tish build --target js always lowers JSX to Lattish runtime calls.

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