Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

useisfocused react navigation

import { useIsFocused } from '@react-navigation/native';

// ...

function Profile() {
  const isFocused = useIsFocused();

  return <Text>{isFocused ? 'focused' : 'unfocused'}</Text>;
}
Source by reactnavigation.org #
 
PREVIOUS NEXT
Tagged: #useisfocused #react #navigation
ADD COMMENT
Topic
Name
9+6 =