Spaces:
Configuration error
Configuration error
Download web/libs/core/src/hooks/useValueRef.ts from bisalsaha/lebel-studio: direct link, hf CLI and curl.
- Browser
- Download file 147 Bytes
-
https://huggingface.co/spaces/bisalsaha/lebel-studio/resolve/main/web/libs/core/src/hooks/useValueRef.ts
- Command line
-
hf download hf://spaces/bisalsaha/lebel-studio/web/libs/core/src/hooks/useValueRef.ts
-
curl -L -o useValueRef.ts https://huggingface.co/spaces/bisalsaha/lebel-studio/resolve/main/web/libs/core/src/hooks/useValueRef.ts
147 Bytes
| import { useRef } from "react"; | |
| export function useValueRef<T>(value: T) { | |
| const ref = useRef<T>(value); | |
| ref.current = value; | |
| return ref; | |
| } | |