Functions - Telemetry
React hook that reports the *first* mount of a component to the component telemetry queue.
Usage:
```tsx
import { useComponentTelemetry } from 'datadog-ux-utils/react';
export function Button(props) {
useComponentTelemetry('Button', { variant: props.variant });
return <button {...props} />;
}
```
Ensure you called `initComponentTelemetry()` somewhere during app startup.
Functions - Telemetry
React hook that reports the *first* mount of a component to the component telemetry queue.
Usage:
```tsx
import { useComponentTelemetry } from 'datadog-ux-utils/react';
export function Button(props) {
useComponentTelemetry('Button', { variant: props.variant });
return <button {...props} />;
}
```
Ensure you called `initComponentTelemetry()` somewhere during app startup.