React api call best practice. Testing API Requests.