Skip to content

Alpine.js Toolkit

@ailuracode · Interactive plugin demos

Query Stack

Store-agnostic query cache with Alpine and Zustand adapters, recommended kit bundle, and devtools.

Shared query scenarios

The demo below runs equivalent loading, success, error, invalidation, and refetch flows across Nanostores, Alpine.reactive, and Zustand adapters. Open Query Devtools from the page chrome to inspect observers.

QuerycreateQueryClient · query({ adapter })
Store-agnostic query cache with pluggable reactivity adapters.

Three adapters — pick one for query({ adapter }). Each card runs the same paginated PokeAPI demo. Use Invalidate, Prefetch Next, andRemove Cache to exercise the cache API. Open Query Devtools (bottom-right) to inspect observers.

Nanostores
#Name
Alpine.reactive
#Name
Zustand
#Name
Mutations, Retry & Polling
Uses the Nanostores $store.query cache — same store as the adapters above.
mutate()

Pending…

Result:

retry
FetchingErrorSuccess

Succeeded after attempts

refetchInterval

Last fetch:

Polls every 3s while this panel is mounted.

Packages: @ailuracode/alpine-query,@ailuracode/alpine-query-kit,@ailuracode/alpine-query-adapter-alpine,@ailuracode/alpine-query-adapter-zustand

Stack roles

Foundation
Query
Store-agnostic query cache with pluggable reactivity adapters.
Read docs
Recommended bundle
Query kit
Recommended query stack: cache, Nanostores adapter, and optional devtools panel.
Open demoRead docs
Adapter
Query adapter (Alpine)
Native Alpine.reactive adapter for the query cache.
Adapter
Query adapter (Zustand)
Zustand vanilla adapter bridged to Alpine.reactive.

Focused package demos

Query

Core

Store-agnostic query cache with pluggable reactivity adapters.

createQueryClient · query({ adapter })

Recommended query stack: cache, Nanostores adapter, and optional devtools panel.

$store.query · devtools

Read the composition guidefor install paths and dependency direction.