@meonode/ui
Version:
A structured approach to component composition, direct CSS-first prop styling, built-in theming, smart prop handling (including raw property pass-through), and dynamic children.
10 lines • 563 B
TypeScript
import type { DataChannel } from '../types/node.type.js';
/**
* React hook that subscribes to a DataChannel and returns the current snapshot.
* Re-renders the component whenever the channel pushes new data via `set()`.
* @template T The data type of the channel.
* @param channel The data channel to subscribe to, or null/undefined.
* @returns The current data value, or undefined if no channel is provided.
*/
export declare function useDataChannel<T>(channel: DataChannel<T> | null | undefined): T | undefined;
//# sourceMappingURL=useDataChannel.d.ts.map