import { useRef, useCallback } from 'react' export function useFocus() { const ref = useRef(null) const focus = useCallback(() => ref.current?.focus(), []) return { ref, focus } }