Skip to contentOpen History to see the last commit
useIsomorphicLayoutEffect.ts
4 lines162 Bytes
1import { useEffect, useLayoutEffect } from 'preact/hooks' 3export const useIsomorphicLayoutEffect = 4 typeof window !== 'undefined' ? useLayoutEffect : useEffect