Generateurv2/frontend/hooks/useFocus.hook.jsx

8 lines
185 B
React
Raw Permalink Normal View History

2022-05-18 10:15:54 +02:00
import { useEffect } from "react";
export default function useFocus(ref) {
useEffect(() => {
console.log('FOOOCUUUUSSSS did !', ref.current)
ref.current.focus()
}, [ref])
}