The React entry point exposes three things: a provider that manages tracker lifecycle, a renderless identify component that syncs user identity, and a hook that returns the underlying tracker.Documentation Index
Fetch the complete documentation index at: https://docs.lucenthq.com/llms.txt
Use this file to discover all available pages before exploring further.
LucentProvider
Wraps your app, creates a singleLucentTracker instance, and manages
start/stop across the component lifetime.
Props
Your Lucent publishable key (
luc_pk_...). Safe to expose in client‑side
code — it can only write session data to your org and cannot read anything.Any option accepted by
LucentTracker except publicKey. See the
Configuration page for the full list.Your application tree.
Lifecycle
The provider creates the tracker lazily on first render. On mount it callstracker.start() (unless options.autoStart === false). On unmount it calls
tracker.stop(), which flushes any buffered events.
LucentIdentify
A renderless component that callstracker.identify(...) whenever its props
change, and tracker.resetIdentity() when userId becomes null. Use it to
sync your auth state with Lucent declaratively.
Props
Your internal user ID. When this transitions from a value to
null, Lucent
resets the identity and generates a new anonymous ID.Optional email address. Shown in the dashboard to help you find sessions.
Optional display name.
Arbitrary key/value pairs attached to the user. Useful for plan tier,
signup date, feature flags, etc.
Feature flags for Signals
If your app records sessions with Lucent SDK and uses a separate feature flag provider, pass the evaluated flag values throughproperties.featureFlags.
Signals can filter SDK sessions by these observed values.
properties object so LucentIdentify calls
identify again.
useLucent
Returns the tracker instance from the nearestLucentProvider, or null if
called outside a provider. Use this when you want to track custom events or
manually flush.