(state: T)
| 1 | import { useRef, MutableRefObject } from 'react'; |
| 2 | |
| 3 | export function useUpdateRef<T>(state: T): MutableRefObject<T> { |
| 4 | const ref = useRef<T>(state); |
| 5 | ref.current = state; |
| 6 | |
| 7 | return ref; |
| 8 | } |
no outgoing calls
no test coverage detected