title: React window open disable popup on click
body: <p>I've got a component where I click and should open new window with response url, In my case I'm waiting for a response and success complete  and then hit this open link.
  HOw to avoid popup browes's blocks</p>
  
  <pre><code>....
  const generateCoPayCardTest = () =&gt; {
          if (!completed) {
              generateCoPayCard({
                  patientId,
                  pharmacyName
              });
  
              return;
          }
  
          openNewWindow({ url: data.copay_pdf_url });
      };
  
      useEffect(() =&gt; {
          if (completed) openNewWindow({ url: data.copay_pdf_url });
      }, [completed]);
  
  ...
  &lt;LinkButton onClick={() =&gt; generateCoPayCardTest()} /&gt;
  </code></pre>
  
  <p>Also I have open window function </p>
  
  <pre><code>export const openNewWindow = ({ url, features = ['noopener', 'noreferrer'] }) =&gt;
      window.open(url, '', features);
  </code></pre>