mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
## Problem Knip reports many duplicate exports (both named and default). Besides, we're moving away from default exports and even have an eslint rule to enforce it on new code. ## Solution - Cleanup those exports - Update imports when necessary No functional changes. If it builds, it's fine
8 lines
166 B
TypeScript
8 lines
166 B
TypeScript
import { useRef } from 'react'
|
|
|
|
export const useLatest = <T>(value: T): { readonly current: T } => {
|
|
const ref = useRef(value)
|
|
ref.current = value
|
|
return ref
|
|
}
|