title: Check if screen is getting blurred or focus in React native?
body: <p>i am using this</p>
  <pre><code>useEffect(() =&gt; {
          const navFocusListener = navigation.addListener('didFocus', () =&gt; {
          console.log('focus');
      });
  
      return () =&gt; {
          navFocusListener.remove();
      };
    }, []);
  </code></pre>
  <p>I am using this code also tried other listeners. but there is no benefit, i am using react-native-immediate-call package for ussd dialing but as it doesn't have any callback. So i i call this function a dialer open for dialing for the USSD code. So now i want that when ussd dialing completes then comes back to screen and a api will call to get response. So how can i detect that USSD dialing is running running or completed so that i can make a request to the api.</p>