Generateurv2/frontend/hooks/useFocus.hook.jsx
2022-05-18 10:15:54 +02:00

8 lines
185 B
JavaScript

import { useEffect } from "react";
export default function useFocus(ref) {
useEffect(() => {
console.log('FOOOCUUUUSSSS did !', ref.current)
ref.current.focus()
}, [ref])
}