title: ComponentDidMount causing my server to crash
body: <p>Below is my Code. ComponentDidMount lifecycle method is invoking on a function which is further making a fetch call to the server. The problem is infinite fetch calls are being made to the server.</p>
  
  <p>Can someone explain what could be going wrong. If I do not use ComponentDidMount lifecycle method and invoke the function (making fetch request) then everything seems to be working fine.</p>
  
  <pre><code>class BusinessList extends Component {
      constructor(props) {
          super(props);
      }
  
      componentDidMount() {
          this.props.getBusinessList();
      }
  
      render() {
          if (!cookie.load('userservice')) return &lt;Redirect to="/"/&gt;
          else {
              this.props.resetLoginForm();
              if (this.props.businessList.length === 0) {
                  // No business Configured. Display the option to add new business
                  return &lt;div&gt;No Business Configured. Add a new Business&lt;/div&gt;
              }
              else if (this.props.businessList[0]['message']) {
                  //message is present in BusinessList state i.e. an error so just display the message
                  return &lt;div&gt;{this.props.businessList[0].message}&lt;/div&gt;
              }
              else {
                  // data is present. Display the data. ALong with option to Add New Business.
                  return &lt;BusinessCard businessList={this.props.businessList}/&gt;
              }
          } 
      }
  }
  </code></pre>