Skip to content

Resources examples

Worked, runnable apps in the repo that exercise the resources surface — read them next to the Concepts page to see the ideas in real code.

  • resources — the focused read-resource lifecycle: one articles list + one detail, showing all four ways a read gets caused (route entry, an event lease, a manual refresh, a machine-owned ensure) plus the passive :loading / :fetching / :refresh-error status flow. Read-side only — start here.
  • realworld_resources — the full Conduit app rebuilt on resources (reads) + mutations (writes), so you can watch the whole read → write → invalidate → refetch loop end to end: scoped invalidation, optimistic favourites with rollback, declarative pagination, and a named session scope.
  • realworld — the same Conduit app, but with reads/writes hand-rolled on raw :rf.http/managed and Pattern-RemoteData slices instead of resources. The before-picture: read it beside realworld_resources to see exactly what the resource surface buys you.
  • infinite_feed — a load-more / infinite-scroll timeline on the :infinite true resource primitive: one growing cache entry, a causal load-more, a runtime-owned cursor (the view never threads it), and a nil next-page terminal. The accumulate-together counterpart to numbered pagination.
  • managed_http_counter — the bare :rf.http/managed transport that resources lower onto, with no resource layer at all: default reply addressing, real-vs-stubbed traffic, and a genuine in-flight abort. Useful for seeing the substrate resources are built on.