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 do | Example |
|---|---|
| Counter-like state and updates | features/01-slot-and-reducer |
| Constrain a value's range or format | features/02-nominal-type |
| Immutably update a record | features/04-record-and-copy |
| Pure helper functions | features/05-pure-fn |
Collections
| What you want to do | Example |
|---|---|
| map / filter / render a list | features/07-list |
| Add, get, remove on a Map | features/08-map |
| Toggle with a Set | features/09-set |
| Handle an optional value (maybe present) | features/10-option |
| Represent success or failure | features/22-result |
| Date-time and duration | features/11-time-and-duration |
UI
| What you want to do | Example |
|---|---|
| Lay out in rows, columns, or grids | features/12-layout |
| Two-way binding with an input field | features/13-text-input-bind |
| Dropdown | features/14-select |
| Checkbox | features/15-checkbox |
| Show conditionally | features/16-conditional-ui |
| Theme switching | features/17-theme |
App Level
| What you want to do | Example |
|---|---|
| Routing, parameters, and 404 | features/18-routing |
| Fetch data over HTTP | features/19-effect-http |
| Persist to localStorage | features/20-effect-storage |
| Periodic execution (timer) | features/21-timer |
| Work on startup or route transition | features/23-lifecycle-route-enter |
See Combinations in Real Apps
- CRUD + Map + Option: apps/04-issue-tracker
- Nested data + Kanban + theme: apps/05-project-management