Query usage analytics data from your React components
useAnalytics
hook provides access to usage analytics and reporting data. It’s the client-side equivalent of the /query endpoint, allowing you to fetch and display usage data directly in your React components.
autumnHandler
in your
backend and the <AutumnProvider />
in your frontend, as described in the
quickstart guide. This gives the hooks
access to the customerId making the request.data
period
: Unix timestamp in milliseconds representing the start of the time periodfeatureId
with their usage amountsisLoading
error
refetch