Recipes/Recipes
Recipes
The guide explains each part of the adapter on its own. A recipe puts the parts together to solve one task end to end: the problem, the code, and why it works. Every sample on these pages is compiled against the published package before it ships.
Scoping state
Section titled “Scoping state”Two independent lists on one pageGive each component its own query builder, so a filter in one never re-fetches the other.
One builder per feature serviceRoot-scoped services that each keep a private builder, paginator and store.
Lists in the URL
Section titled “Lists in the URL”A debounced search boxType into the URL without a navigation, or a request, per keystroke.
Pagination controlsPage numbers with gaps, previous and next, and a “21–34 of 34” label.
Sortable table headersColumn headers that toggle the sort, with the right aria-sort.
A list scoped by a route parameterA project's tasks at /projects/:id/tasks: a typed list input from the route.
Fetching and testing
Section titled “Fetching and testing”Backends that paginate with headersWordPress, Ransack and PostgREST ranges, with qubeeHttpResource() or HttpClient.
Testing a list componentDrive a list with the memory adapter and assert its requests.