## API Report File for "@microsoft/applicationinsights-react-js"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

import { BaseTelemetryPlugin } from '@microsoft/applicationinsights-core-js';
import { Context } from 'react';
import { Dispatch } from 'react';
import { History as History_2 } from 'history';
import { IAppInsights } from '@microsoft/applicationinsights-core-js';
import { IAppInsightsCore } from '@microsoft/applicationinsights-core-js';
import { IConfiguration } from '@microsoft/applicationinsights-core-js';
import { ICookieMgr } from '@microsoft/applicationinsights-core-js';
import { ICustomProperties } from '@microsoft/applicationinsights-core-js';
import { IEventTelemetry } from '@microsoft/applicationinsights-core-js';
import { IExceptionTelemetry } from '@microsoft/applicationinsights-core-js';
import { IMetricTelemetry } from '@microsoft/applicationinsights-core-js';
import { IPageViewTelemetry } from '@microsoft/applicationinsights-core-js';
import { IPlugin } from '@microsoft/applicationinsights-core-js';
import { IProcessTelemetryContext } from '@microsoft/applicationinsights-core-js';
import { ITelemetryContext } from '@microsoft/applicationinsights-core-js';
import { ITelemetryItem } from '@microsoft/applicationinsights-core-js';
import { ITelemetryPluginChain } from '@microsoft/applicationinsights-core-js';
import { ITraceTelemetry } from '@microsoft/applicationinsights-core-js';
import * as React_2 from 'react';
import { default as React_3 } from 'react';
import { SetStateAction } from 'react';

// @public
export abstract class AITrackedComponentBase<P> extends React_2.Component<P> {
    constructor(props: P, reactPlugin: ReactPlugin, componentName: string);
    // (undocumented)
    componentDidMount(): void;
    // (undocumented)
    protected _componentName: string;
    // (undocumented)
    componentWillUnmount(): void;
    // (undocumented)
    protected _firstActiveTimestamp: number;
    // (undocumented)
    protected _idleCount: number;
    // (undocumented)
    protected _idleStartTimestamp: number;
    // (undocumented)
    protected _idleTimeout: number;
    // (undocumented)
    protected _intervalId?: any;
    // (undocumented)
    protected _lastActiveTimestamp: number;
    // (undocumented)
    protected _mountTimestamp: number;
    // (undocumented)
    protected _reactPlugin: ReactPlugin;
    // (undocumented)
    protected _totalIdleTime: number;
    // (undocumented)
    protected trackActivity: (e: React_2.SyntheticEvent<any>) => void;
}

// Warning: (ae-forgotten-export) The symbol "AppInsightsReactContext" needs to be exported by the entry point applicationinsights-react-js.d.ts
//
// @public (undocumented)
export const AppInsightsContext: AppInsightsReactContext;

// Warning: (ae-forgotten-export) The symbol "IAppInsightsErrorBoundaryProps" needs to be exported by the entry point applicationinsights-react-js.d.ts
// Warning: (ae-forgotten-export) The symbol "IAppInsightsErrorBoundaryState" needs to be exported by the entry point applicationinsights-react-js.d.ts
//
// @public (undocumented)
export class AppInsightsErrorBoundary extends React_3.Component<IAppInsightsErrorBoundaryProps, IAppInsightsErrorBoundaryState> {
    // (undocumented)
    componentDidCatch(error: Error, errorInfo: React_3.ErrorInfo): void;
    // (undocumented)
    render(): React_3.ReactNode;
    // (undocumented)
    state: IAppInsightsErrorBoundaryState;
}

// @public
export interface IReactExtensionConfig {
    readonly history?: History_2;
}

// @public (undocumented)
export class ReactPlugin extends BaseTelemetryPlugin {
    constructor();
    // (undocumented)
    readonly context: ITelemetryContext;
    getAppInsights(): IAppInsights;
    getCookieMgr(): ICookieMgr;
    // (undocumented)
    identifier: string;
    // (undocumented)
    initialize(config: IConfiguration, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain): void;
    // (undocumented)
    priority: number;
    processTelemetry(env: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
    // (undocumented)
    trackEvent(event: IEventTelemetry, customProperties?: ICustomProperties): void;
    // (undocumented)
    trackException(exception: IExceptionTelemetry, customProperties?: ICustomProperties): void;
    // (undocumented)
    trackMetric(metric: IMetricTelemetry, customProperties: ICustomProperties): void;
    // (undocumented)
    trackPageView(pageView: IPageViewTelemetry): void;
    // (undocumented)
    trackTrace(trace: ITraceTelemetry, customProperties?: ICustomProperties): void;
}

// @public (undocumented)
export const useAppInsightsContext: () => ReactPlugin;

// Warning: (ae-forgotten-export) The symbol "AIReactCustomEvent" needs to be exported by the entry point applicationinsights-react-js.d.ts
//
// @public (undocumented)
export function useTrackEvent<T>(reactPlugin: ReactPlugin, eventName: string, eventData: T, skipFirstRun?: boolean): AIReactCustomEvent<T>;

// @public (undocumented)
export const useTrackMetric: (reactPlugin: ReactPlugin, componentName: string, customProperties?: ICustomProperties) => () => void;

// @public
export function withAITracking<P>(reactPlugin: ReactPlugin, Component: React_2.ComponentType<P>, componentName?: string, className?: string): React_2.ComponentClass<P>;

// (No @packageDocumentation comment for this package)

```
