1.1
The domain is the API
State is plain objects and pure functions, in the shape your domain already has. No stores, no actions, no dispatch.
TypeScript & ReScript·Open source·MIT
A state management library for TypeScript and ReScript supporting Domain-Driven Design. Plain objects, pure functions, views that observe them directly — no stores, no dispatch, no boilerplate.
tilia /ti·li·a/ n., Latin — the linden. The carver's wood: even-grained, cuts clean, holds detail.
const sky = tilia({
color: 'pink'
})
observe(() => {
console.log(sky.color)
})
// React integration
function Sky() {
useTilia()
return <div>{sky.color}</div>
}
let sky = tilia({
color: "pink"
})
observe(() => {
Console.log(sky.color)
})
// React integration
let make = () => {
useTilia()
<div> {React.string(sky.color)} </div>
}
$ npm install tiliaState management usually asks the domain to bend to the framework. tilia bends the other way.
1.1
State is plain objects and pure functions, in the shape your domain already has. No stores, no actions, no dispatch.
1.2
Components re-render exactly when a value they read changes — no selectors, no memo rituals, no stale props.
1.3
Written in ReScript, published with first-class TypeScript types. Your state's shape is checked everywhere it is touched.