React TypeScript Wejście Zestaw Focus Dinamicznie

// ref for focus dinamically
const search = useRef<any>(null);
...
<input ref={search}/>
...
if(search.current?.focus)
	search.current?.focus();
GutoTrosla