import useTimeoutFn from './useTimeoutFn' ; import useUpdate from './useUpdate' ; export type UseTimeoutReturn = [ ( ) => boolean | null , ( ) => void , ( ) => void ] ; export default function useTimeout ( ms = 0 ) { const update = useUpdate ( ) ; return useTimeoutFn ( update , ms ) ; }