mirror of
https://github.com/supabase/supabase.git
synced 2026-05-08 18:00:20 -04:00
1cd1ebfc7f
Sorted all imports in all packages, `cms`, `design-system` and `ui-library` apps by running `pnpm format` on them. All changes in this PR are done by the script.
16 lines
350 B
TypeScript
16 lines
350 B
TypeScript
'use client'
|
|
|
|
import { useCallback, useRef } from 'react'
|
|
|
|
/**
|
|
* Don't use this, could be deleted anytime.
|
|
*
|
|
* @internal
|
|
*/
|
|
export function useEffectEvent<F extends (...params: never[]) => unknown>(callback: F): F {
|
|
const ref = useRef(callback)
|
|
ref.current = callback
|
|
|
|
return useCallback(((...params) => ref.current(...params)) as F, [])
|
|
}
|