Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@dotcms/react

Package Overview
Dependencies
Maintainers
1
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotcms/react - npm Package Compare versions

Comparing version
1.1.1-next.7
to
1.1.1-next.8
+27
src/lib/next/hooks/useIsAnalyticsActive.d.ts
/**
* @internal
* React hook that checks whether DotCMS Analytics is active.
*
* Uses useSyncExternalStore to subscribe to analytics state changes via custom events:
* - `dotcms:analytics:ready`: Fired when Analytics initializes
* - `dotcms:analytics:cleanup`: Fired on page unload
*
* Components automatically re-render when analytics state changes. Works regardless
* of initialization order and returns false during SSR.
*
* @returns {boolean} True if analytics is active, false otherwise
*
* @example
* ```tsx
* function Contentlet({ item }) {
* const isAnalyticsActive = useIsAnalyticsActive()
*
* const attrs = isAnalyticsActive
* ? { 'data-dot-analytics-id': item.id }
* : {}
*
* return <div {...attrs}>{item.title}</div>
* }
* ```
*/
export declare const useIsAnalyticsActive: () => boolean;
+1
-1
{
"name": "@dotcms/react",
"version": "1.1.1-next.7",
"version": "1.1.1-next.8",
"peerDependencies": {

@@ -5,0 +5,0 @@ "react": ">=18",

Sorry, the diff of this file is too big to display