LogRocket React Plugin (`logrocket-react`) is an optional add-on package designed to integrate LogRocket's session replay and monitoring capabilities specifically with React applications. It allows developers to search for user sessions based on interactions with specific React components within their app. The package is currently at version 7.0.0, supporting React 19. It maintains a distinct versioning scheme tied directly to major React versions, requiring users to install a specific `logrocket-react` version corresponding to their React installation (e.g., `v7` for React 19, `v6` for React 18). This tight coupling dictates its release cadence, typically aligning with new React major releases. A key differentiator is its reliance on the `displayName` property of React components for reporting component names, which often requires specific build tooling or manual intervention.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Main export for initializing the React plugin. The package primarily uses ES modules. Ensure LogRocket (core) is imported and initialized first.
An alternative or older named export for initialization, though `LogRocketReact.init(LogRocket)` is the current recommended pattern for v7. Use this only if specifically documented for a legacy setup.
While not from `logrocket-react` directly, `LogRocket` from the core `logrocket` package is an essential dependency that must be imported and initialized *before* `logrocket-react`.
This quickstart demonstrates how to initialize LogRocket and its React plugin, then render a simple React component that explicitly sets its `displayName` property, which is crucial for LogRocket's component tracking feature. It also shows how to manually track an event.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.
No traffic data recorded yet.