14 lines
314 B
TypeScript
14 lines
314 B
TypeScript
import { useSyncExternalStore } from "react";
|
|
import {
|
|
getContentManagerSnapshot,
|
|
subscribeContentManager,
|
|
} from "./contentManager";
|
|
|
|
export function useContentManagerSnapshot() {
|
|
return useSyncExternalStore(
|
|
subscribeContentManager,
|
|
getContentManagerSnapshot,
|
|
getContentManagerSnapshot,
|
|
);
|
|
}
|