Files
powerpoint-toolbox/node_modules/@fluentui/react-teaching-popover/lib/components/TeachingPopoverCarousel/Carousel/useCarouselValues.js
T
2025-03-07 19:22:02 +01:00

7 lines
343 B
JavaScript

import { useSyncExternalStore } from 'use-sync-external-store/shim';
import { useCarouselContext_unstable } from './CarouselContext';
export function useCarouselValues_unstable(getSnapshot) {
const store = useCarouselContext_unstable((c)=>c.store);
return useSyncExternalStore(store.subscribe, ()=>getSnapshot(store.getSnapshot()));
}