@suspensive/react
Version:
Suspensive interfaces for react
1 lines • 531 B
Source Map (JSON)
{"version":3,"file":"useIsClient.mjs","names":[],"sources":["../src/useIsClient.ts"],"sourcesContent":["'use client'\nimport { useSyncExternalStore } from 'react'\nimport { noop } from './utils/noop'\n\nconst emptySubscribe = () => noop\nconst getSnapshot = () => true\nconst getServerSnapshot = () => false\nexport const useIsClient = () => useSyncExternalStore(emptySubscribe, getSnapshot, getServerSnapshot)\n"],"mappings":";;;;;;AAIA,MAAM,uBAAuB;AAC7B,MAAM,oBAAoB;AAC1B,MAAM,0BAA0B;AAChC,MAAa,oBAAoB,qBAAqB,gBAAgB,aAAa,iBAAiB"}