title: ReactJS fetch causes infinite loop
body: <p>I have two apps one of them is NodeJS listening 5000's port and the other is ReactJS listening 3000's port.</p>
  
  <p>I can return JSON from NodeJS like this (<a href="http://localhost:5000/api/28/10/2018" rel="nofollow noreferrer">http://localhost:5000/api/28/10/2018</a>):</p>
  
  <pre><code>{
    "date": "28.10.2018",
    "across": [
      {"no": "1", "text": "Warning about an incoming projectile"},
      {"no": "5", "text": "Rapper/producer behind Beats headphones"},
      {"no": "6", "text": "Noble gas below xenon on the periodic table"},
      {"no": "7", "text": "Setting for much of \"Finding Nemo\""},
      {"no": "8", "text": "Looney Tunes character who says \"Th-th-th-that's all, folks!\""}
    ],
    "down": [
      {"no": "1", "text": "Harry's enemy at Hogwarts"},
      {"no": "2", "text": "Milk dispenser"},
      {"no": "3", "text": "Sound from a frog"},
      {"no": "4", "text": "Country music star Chesney"},
      {"no": "5", "text": "The shape of water?"}
    ],
    "cells": ["-1","1","2","3","4","5","0","0","0","0","6","0","0","0","0","7","0","0","0","0","8","0","0","0","0"]
  }
  </code></pre>
  
  <p>I want to display this data with ReactJS but when I try fetch method it creates endless loop. How to solve this?</p>
  
  <p>My ReactJS code:</p>
  
  <pre><code>drawTable = (props) =&gt; {
    /* Some if-elseif that is not related to the question */
    else {
      // here props.type get an array that hold input from terminal
      let day, month, year;
      day = props.type[1];
      month = props.type[2];
      year = props.type[3];
  
      if (day === undefined || month === undefined || year === undefined) {
        console.log("Please use get-old command properly!");
        console.log("Usage:\nget-old day month year");
        console.log("Example:\nget-old 28 10 2018");
        return idle;
      }
      // If arguments defined go fetch
      let url = `http://localhost:${REACT_PORT}/old/${day}/${month}/${year}`;
      fetch(url)
      .then((response) =&gt; response.json())
      .then((data) =&gt; {
        this.setState({data: data});
      })
      .catch((error) =&gt; {
        console.error(error);
      });
      console.log(this.state.data);
    }
  }
  </code></pre>
  
  <p>This log many JSON object. </p>