mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-31 22:43:11 +02:00
Switch to BiomeJS (#306)
This commit is contained in:
@@ -6,9 +6,9 @@ import { useEffect, useState } from 'react';
|
||||
*/
|
||||
export function useStateWithDeps<T>(defaultValue: T | (() => T), deps: DependencyList) {
|
||||
const [value, setValue] = useState(defaultValue);
|
||||
// biome-ignore lint/correctness/useExhaustiveDependencies: none
|
||||
useEffect(() => {
|
||||
setValue(defaultValue);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [...deps]);
|
||||
return [value, setValue] as const;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user