turn on focus mode in react native on button click code example
Example: react focus textarea
const focusDiv = useRef();
useEffect(() => {
if(focusDiv.current) focusDiv.current.focus();
}, [focusDiv]);
return (
<div ref={focusDiv}></div>
);
const focusDiv = useRef();
useEffect(() => {
if(focusDiv.current) focusDiv.current.focus();
}, [focusDiv]);
return (
<div ref={focusDiv}></div>
);