UNPKG

piral-core

Version:

The core library for creating a Piral instance.

13 lines (12 loc) 487 B
import { SharedDataItem } from '../types'; /** * Hook that yields the full shared data. * Any change to the shared data yields the new data. */ export declare function useSharedData(): Record<string, SharedDataItem>; /** * Hook that yields the selected subset of the shared data. * Only changes to this subset will yield a new data state. * @param select The subset selection. */ export declare function useSharedData<R>(select: (source: Record<string, SharedDataItem>) => R): R;