title: Detect when user moves to specific screens react-navigation
body: <p>I am using react-navigation with react-native and I have bottomTabs for navigation, I have a screen to edit some info, I want to be able to detect when the user tries to move from that screen to other &quot;specific&quot; screens to trigger a certain action.</p>
  <p>what I tried:</p>
  <pre><code>useEffect(
      () =&gt;
          navigation.addListener('blur', (e) =&gt; {
              // Prompt the user before leaving the screen
                  Alert.alert('You haven’t saved your changes,[
                      { text: translate('yes'), style: 'cancel' },
                      {
                          text: translate('no'),
                          style: 'destructive',
                          onPress: () =&gt; navigation.navigate('EditProfileScreen'),
                      },
                  ])
          }),
      [navigation]
  )
  </code></pre>
  <p>But the above triggers when I move to any screen, while I want it only to be triggered for specific screens.
  Any insights?</p>