Skip to content

Recipes

Each recipe links to a corresponding minimal example. The fastest path is to look at the example first, then confirm the details in Kumiki Specification.

State

What you want to doExample
Counter-like state and updatesfeatures/01-slot-and-reducer
Constrain a value's range or formatfeatures/02-nominal-type
Immutably update a recordfeatures/04-record-and-copy
Pure helper functionsfeatures/05-pure-fn

Collections

What you want to doExample
map / filter / render a listfeatures/07-list
Add, get, remove on a Mapfeatures/08-map
Toggle with a Setfeatures/09-set
Handle an optional value (maybe present)features/10-option
Represent success or failurefeatures/22-result
Date-time and durationfeatures/11-time-and-duration

UI

What you want to doExample
Lay out in rows, columns, or gridsfeatures/12-layout
Two-way binding with an input fieldfeatures/13-text-input-bind
Dropdownfeatures/14-select
Checkboxfeatures/15-checkbox
Show conditionallyfeatures/16-conditional-ui
Theme switchingfeatures/17-theme

App Level

What you want to doExample
Routing, parameters, and 404features/18-routing
Fetch data over HTTPfeatures/19-effect-http
Persist to localStoragefeatures/20-effect-storage
Periodic execution (timer)features/21-timer
Work on startup or route transitionfeatures/23-lifecycle-route-enter

See Combinations in Real Apps