UNPKG

@livelike/react-native

Version:

LiveLike React Native package

15 lines (12 loc) 414 B
import { widgetStore } from '../store'; import { useSelectedFieldStore } from './useSelectedFieldStore'; export type UseWidgetInteractionsArg = { widgetId: string; }; export function useWidgetInteractions({ widgetId }: UseWidgetInteractionsArg) { const widgetInteractions = useSelectedFieldStore( widgetStore, () => widgetStore.get()[widgetId]?.widgetInteractions ); return widgetInteractions; }