fix: more eye-droper fixes (#7019)
This commit is contained in:
7
src/hooks/useStable.ts
Normal file
7
src/hooks/useStable.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { useRef } from "react";
|
||||
|
||||
export const useStable = <T extends Record<string, any>>(value: T) => {
|
||||
const ref = useRef<T>(value);
|
||||
Object.assign(ref.current, value);
|
||||
return ref.current;
|
||||
};
|
Reference in New Issue
Block a user