title: Reactjs multiple fetch - TypeError: Cannot read property 'last' of undefined
body: <p>I already have one fetch and want to get multiple fetch but the second fetch like can't read the data. It show "TypeError: Cannot read property 'last' of undefined".</p>
  
  <p>This is my code for one fetch : </p>
  
  <pre><code>class App extends Component {
  constructor(props) {
      super(props);
      this.state = {
          error: null,
          isLoaded: false,
          ticker: []
      };
  }
  
  componentDidMount() {
      fetch("https://vip.bitcoin.co.id/api/btc_idr/ticker")
      .then(res =&gt; res.json())
      .then(
          (result) =&gt; {
              this.setState({
                  isLoaded: true,
                  tickerBtcIdr: result.ticker
              });
          },
          (error) =&gt; {
              this.setState({
                  isLoaded: true,
                  error
              });
          }
      )
  }
  
  render() {
      const {
          error,
          isLoaded,
          tickerBtcIdr,
      }  = this.state;
      if (error) {
          return &lt;div&gt;Error: {error.message}&lt;/div&gt;;
      } else if (!isLoaded) {
          return (
              &lt;div&gt;
                  &lt;div className="App"&gt;&lt;/div&gt;
                  &lt;div className="Loading"&gt;
                      &lt;Loading /&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          );
      } else {
          return (
              &lt;div className="App"&gt;
                  &lt;AppBar /&gt;
                  &lt;table&gt;
                      &lt;tr&gt;
                          &lt;td&gt;&lt;b&gt;IDR MARKETS&lt;/b&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt;BTC/IDR&lt;/td&gt;
                          &lt;td&gt;Bitcoin&lt;/td&gt;
                          &lt;td&gt;{tickerBtcIdr.last}&lt;/td&gt;
                          &lt;td&gt;{tickerBtcIdr.vol_idr}&lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/table&gt;
              &lt;/div&gt;
          );
      }
  }}
  </code></pre>
  
  <p>This work, but if i duplicate the fetch like :</p>
  
  <pre><code>    componentDidMount() {
      fetch("https://vip.bitcoin.co.id/api/btc_idr/ticker")
      .then(res =&gt; res.json())
      .then(
          (result) =&gt; {
              this.setState({
                  isLoaded: true,
                  tickerBtcIdr: result.ticker
              });
          },
          (error) =&gt; {
              this.setState({
                  isLoaded: true,
                  error
              });
          }
      )
  
      fetch("https://vip.bitcoin.co.id/api/bch_idr/ticker")
      .then(res =&gt; res.json())
      .then(
          (result) =&gt; {
              this.setState({
                  isLoaded: true,
                  tickerBchIdr: result.ticker
              });
          },
          (error) =&gt; {
              this.setState({
                  isLoaded: true,
                  error
              });
          }
      )
  }
  </code></pre>
  
  <p>And i render it :</p>
  
  <pre><code>    render() {
      const {
          error,
          isLoaded,
          tickerBtcIdr,
          tickerBchIdr,
      }  = this.state;
      if (error) {
          return &lt;div&gt;Error: {error.message}&lt;/div&gt;;
      } else if (!isLoaded) {
          return (
              &lt;div&gt;
                  &lt;div className="App"&gt;&lt;/div&gt;
                  &lt;div className="Loading"&gt;
                      &lt;Loading /&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          );
      } else {
          return (
              &lt;div className="App"&gt;
                  &lt;AppBar /&gt;
                  &lt;table&gt;
                      &lt;tr&gt;
                          &lt;td&gt;BTC/IDR&lt;/td&gt;
                          &lt;td&gt;{tickerBtcIdr.last}&lt;/td&gt;
                          &lt;td&gt;{tickerBtcIdr.vol_idr}&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt;BCH/IDR&lt;/td&gt;
                          &lt;td&gt;{tickerBchIdr.last}&lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/table&gt;
              &lt;/div&gt;
          );
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>It show "TypeError: Cannot read property 'last' of undefined".</p>