Files
PecHub/frontend/node_modules/@radix-ui/react-use-is-hydrated/src/use-is-hydrated.tsx
T
2026-03-18 20:54:43 +01:00

17 lines
309 B
TypeScript

import { useSyncExternalStore } from 'use-sync-external-store/shim';
/**
* Determines whether or not the component tree has been hydrated.
*/
export function useIsHydrated() {
return useSyncExternalStore(
subscribe,
() => true,
() => false
);
}
function subscribe() {
return () => {};
}