title: React wait for a specific response from API
body: <p>I have a page that waits for a specific status from the server.</p>
  <p>The thing is, that the server has statuses - (Enabled, In_Progress, Disabled), and it returns 200 also for In_Progress.</p>
  <p>I thought about async but the problem is that the server will return a response in case of In_Progress.</p>
  <p>Is there any way to wait until the API will return &quot;Enabled&quot;? Or I have to send a request every X seconds?</p>
  <p><strong>EDIT</strong></p>
  <p>I have an option to change the response (502 instead of 200) on the server-side if it helps.</p>
  <p>Thanks</p>