function Profile({ navigation }) { React.useEffect(() => { const unsubscribe = navigation.addListener('focus', () => { // do something }); return unsubscribe; }, [navigation]); return <ProfileContent />; }