@level.up/analytics-react
v0.1.0
Published
React bindings for @level.up/analytics.
Readme
@level.up/analytics-react
React bindings for @level.up/analytics, independent of the analytics vendor.
Install React and Zod 3 as peers.
Provide a stable transport with <AnalyticsProvider transport={transport}>, then
call useTypedCaptureEvent(catalogue, sharedContext) in descendants. An optional
provider onError receives event names, error reasons and validation issue paths,
never payload values or SDK exception messages.
The hook accepts frontend events from its catalogue, merges the latest context under per-call properties, validates the final payload and strips undeclared top-level fields. Context updates preserve callback identity. Calling the hook outside its provider throws a configuration error.
See the usage guide.
