Examples

Each example is a React app whose state lives in a Foldkit Program. Open one to try it, and read its source next to it.

Counter

A Model, three Messages, and a pure update. The smallest Foldkit loop.

View source
Todo

AsyncData, Commands, and a filter kept in the URL, all in one update function.

View source
Stopwatch

A Subscription ticks while the Model says the stopwatch runs.

View source
API cache

AsyncData as the cache, with invalidation, stale data while refetching, and a refetch Subscription.

View source
API cache with Query

The same cache, with Query.define as a Submodel for settling, retries, and deduplication.

View source
API cache with HttpApi

Query Commands call a typed HttpApi client that the application Layer supplies.

View source