hooks/useDomainExtensions.ts

HAI3 · packages/react/src/mfe/hooks/useDomainExtensions.ts · typescript · Apache-2.0
ui

React hook to subscribe to domain extension changes for dynamic UI composition.

// Source: https://github.com/Artifizer/HAI3 | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * useDomainExtensions Hook - Domain extension list subscription
 *
 * Subscribes to store changes to detect when extensions are registered or unregistered,
 * and returns the current list of extensions for a domain.
 *
 * React Layer: L3
 */
// @cpt-flow:cpt-hai3-flow-react-bindings-use-domain-extensions:p1
// @cpt-algo:cpt-hai3-algo-react-bindings-mfe-context-guard:p1
// @cpt-algo:cpt-hai3-algo-react-bindings-stable-snapshots:p1
// @cpt-dod:cpt-hai3-dod-react-bindings-observation-hooks:p1

import { useSyncExternalStore, useCallback, useRef } from 'react';
import { useHAI3 } from '../

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key