diff --git a/src/useUpdateEffect.ts b/src/useUpdateEffect.ts index dd93542d..15a83f12 100644 --- a/src/useUpdateEffect.ts +++ b/src/useUpdateEffect.ts @@ -5,6 +5,7 @@ import { useFirstMountState } from './useFirstMountState'; * React effect hook that ignores the first invocation (e.g. on mount) * * @param effect effector to run on updates + * @param deps dependencies list, as for `useEffect` hook */ export function useUpdateEffect(effect: EffectCallback, deps?: DependencyList): void { const isFirstMount = useFirstMountState(); diff --git a/tests/dom/useMountEffect.test.ts b/tests/dom/useMountEffect.test.ts index c0d2e288..ab49a9e2 100644 --- a/tests/dom/useMountEffect.test.ts +++ b/tests/dom/useMountEffect.test.ts @@ -1,5 +1,5 @@ import { renderHook } from '@testing-library/react-hooks/dom'; -import { useMountEffect } from '../../src/useMountEffect'; +import { useMountEffect } from '../../src'; describe('useMountEffect', () => { it('should call effector only on first render', () => { diff --git a/tests/dom/useUnmountEffect.test.ts b/tests/dom/useUnmountEffect.test.ts index 3709bec7..c28ccfe3 100644 --- a/tests/dom/useUnmountEffect.test.ts +++ b/tests/dom/useUnmountEffect.test.ts @@ -1,5 +1,5 @@ import { renderHook } from '@testing-library/react-hooks/dom'; -import { useUnmountEffect } from '../../src/useUnmountEffect'; +import { useUnmountEffect } from '../../src'; describe('useUnmountEffect', () => { it('should call effector only when component unmounted', () => { diff --git a/tests/dom/useUpdateEffect.test.ts b/tests/dom/useUpdateEffect.test.ts index 9f8561de..4b793b6d 100644 --- a/tests/dom/useUpdateEffect.test.ts +++ b/tests/dom/useUpdateEffect.test.ts @@ -1,5 +1,5 @@ import { renderHook } from '@testing-library/react-hooks/dom'; -import { useUpdateEffect } from '../../src/useUpdateEffect'; +import { useUpdateEffect } from '../../src'; describe('useUpdateEffect', () => { it('should call effector only on updates (after first render)', () => { diff --git a/tests/ssr/useMountEffect.test.ts b/tests/ssr/useMountEffect.test.ts index ea01bf11..643e2871 100644 --- a/tests/ssr/useMountEffect.test.ts +++ b/tests/ssr/useMountEffect.test.ts @@ -1,5 +1,5 @@ import { renderHook } from '@testing-library/react-hooks/server'; -import { useMountEffect } from '../../src/useMountEffect'; +import { useMountEffect } from '../../src'; describe('useMountEffect', () => { it('should call effector only on first render', () => { diff --git a/tests/ssr/useUnmountEffect.test.ts b/tests/ssr/useUnmountEffect.test.ts index b978f022..1abbc540 100644 --- a/tests/ssr/useUnmountEffect.test.ts +++ b/tests/ssr/useUnmountEffect.test.ts @@ -1,5 +1,5 @@ import { renderHook } from '@testing-library/react-hooks/server'; -import { useUnmountEffect } from '../../src/useUnmountEffect'; +import { useUnmountEffect } from '../../src'; describe('useUnmountEffect', () => { it('should call effector only when component unmounted', () => { diff --git a/tests/ssr/useUpdateEffect.test.ts b/tests/ssr/useUpdateEffect.test.ts index 2e45f48e..d4c921cc 100644 --- a/tests/ssr/useUpdateEffect.test.ts +++ b/tests/ssr/useUpdateEffect.test.ts @@ -1,5 +1,5 @@ import { renderHook } from '@testing-library/react-hooks/server'; -import { useUpdateEffect } from '../../src/useUpdateEffect'; +import { useUpdateEffect } from '../../src'; describe('useUpdateEffect', () => { it('should not call effector on mount', () => {