score:0


import React, { useEffect, useRef} from 'react';
import { useIsFocused } from '@react-navigation/native';

const Screen = (props) => {

const referenceComponent = useRef();
let isFocused = useIsFocused();

useEffect(() => {

//Use focus statement here 
//something like - referenceComponent.current.focus(); 

}, [isFocused]);


return <View>
         /** other components **/

        <ComponentToBeFocused ref={referenceComponent}/>

    <View>

}



Related Query

More Query from same tag