1.1
The domain is the API
State consists of 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 that supports 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)
})
// views: @tilia/react
function Sky() {
useTilia()
return <div>{sky.color}</div>
}
let sky = tilia({
color: "pink"
})
observe(() => {
Console.log(sky.color)
})
// views: @tilia/react
let make = () => {
useTilia()
<div> {React.string(sky.color)} </div>
}
$ npm install tilia @tilia/reactState management usually asks the domain to bend to the framework. tilia bends the other way.
1.1
State consists of 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 and published with first-class TypeScript types. Your state's shape is checked everywhere it is used.