Hooks
API reference for the built-in Clarity hooks.
Hooks
Hooks provide state and side effects in Clarity components.
useRoute()
Returns the active route along with its params.
const { path, params } = useRoute();
useFetch()
A fetch wrapper with automatic caching.
const { data, loading, error } = useFetch('/api/users');