We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d00538 commit 279b48fCopy full SHA for 279b48f
1 file changed
src/useAbortController/useAbortController.ts
@@ -1,6 +1,6 @@
1
import { useCallback, useLayoutEffect, useState } from 'react';
2
import getAbortController from './getAbortController';
3
-import useMounted from '../useMounted';
+import useMounted from '../hooks/useMounted';
4
5
export type UseAbortControllerResult = {
6
abort: () => void;
@@ -13,6 +13,7 @@ export type UseAbortControllerResult = {
13
*/
14
function useAbortController(): UseAbortControllerResult {
15
const mounted = useMounted();
16
+
17
const [controller, setController] = useState(getAbortController);
18
19
useLayoutEffect(() => () => controller?.abort(), [controller]);
0 commit comments