Working with Riposte: the DSL, hooks, shared state, routing, data fetching, and forms.
Working with Riposte: the DSL, hooks, shared state, routing, data fetching, and forms.
Pages
Components & the DSL— A Riposte UI is an immutable tree of VNodes. You don’t build that tree by hand — you describe it with the DSL (element functions, attribute keys, event keys) and…
Hooks— Hooks give a component local state, side effects, memoized values, and access to the DOM. They’re available through a Hooks context that Riposte supplies while rendering — which is exactly…
State with Atoms— useState is enough for state owned by one component. When state needs to be shared across components that aren’t in a simple parent-child line — and you’d rather not thread…
Routing— riposte-router maps URLs to views for single-page apps. It’s built entirely on the core’s public API — useSyncExternalStore for the location, context for route params and the outlet, the DSL…
Data Fetching— riposte-query is an async data layer in the shape of TanStack Query: a keyed cache of server state with caching, deduplication, stale-while-revalidate refetching, and background garbage collection. Where atoms hold…
Forms— riposte-forms is a form layer in the shape of react-hook-form: fields are uncontrolled — the DOM owns the text and the form reads it through a ref — so typing…