import { useState } from 'react' ; import { useMount } from '../useMount' ; returns export function useHasMounted ( ) { const [ hasMounted , setHasMounted ] = useState ( false ) ; useMount ( ( ) => { setHasMounted ( true ) ; } ) ; return hasMounted ; }