Problem refrencing
This commit is contained in:
@@ -2,7 +2,7 @@ import { useEffect, useState } from "react";
|
||||
|
||||
export default function useAction<T>(
|
||||
action: () => Promise<T>,
|
||||
dependencies = [],
|
||||
dependencies: any[] = [],
|
||||
): [T | null, boolean, Error | null] {
|
||||
const [value, setValue] = useState<T | null>(null);
|
||||
const [loaded, setLoaded] = useState(false);
|
||||
@@ -21,7 +21,7 @@ export default function useAction<T>(
|
||||
export function useActionInterval<T>(
|
||||
action: () => Promise<T>,
|
||||
interval: number,
|
||||
dependencies = [],
|
||||
dependencies: any[] = [],
|
||||
): [T | null, boolean, Error | null] {
|
||||
const [value, setValue] = useState<T | null>(null);
|
||||
const [loaded, setLoaded] = useState(false);
|
||||
|
||||
Reference in New Issue
Block a user