@modern-kit/react
Version:
11 lines (8 loc) • 341 B
JavaScript
import { useSyncExternalStore } from 'react';
import { noop } from '@modern-kit/utils';
const subscribe = () => noop;
const getSnapshot = () => true;
const getServerSnapshot = () => false;
const useIsClient = () => useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
export { useIsClient };
//# sourceMappingURL=index.mjs.map