title: React Fetch() my local Node Express backend; Cannot return get request String value
body: <p>I'm setting up a local backend server with node, and I'm trying use <code>fetch</code> to get values to render in my frontend react app. I've gotten most of the way, as everything compiles, however I'm running into issues with fetching the correct values. Or at least, I think I'm doing everything correctly.</p>
  
  <p>The goal is to use <code>fetch()</code> in my <code>app.js</code> to get render values from route <code>foo</code> in <code>server.js</code>.</p>
  
  <p>I can get a response from <code>/foo</code> but it is not what I was sending. I was sending a json object <code>{text: "Foo"}</code> </p>
  
  <p>However, I'm receiving this in the console: <code>App.js:12 Response {type: "basic", url: "http://localhost:3000/foo", redirected: false, status: 200, ok: true, …}</code></p>
  
  <p>Any idea what I'm doing wrong? </p>
  
  <p>Am I not fetching or sending objects correctly between routes? How can I get "Foo" to render on the line <code>&lt;p&gt;The current state is {this.state.message}&lt;/p&gt;</code> in 
  'App.js`</p>
  
  <p>Here is my app.js:</p>
  
  <pre><code>import React, {Component} from 'react';
  import './App.css';
  
  class App extends Component {
      state = {
          message: ""
      };
  
      componentDidMount() {
          fetch('/foo')
              .then(res =&gt; {
                  console.log(res);
                  return res.json();
                  // .then(express =&gt; this.setState({ express }))
                  // .then(() =&gt; console.log(this.state.message));
              });
      }
  
      render() {
          return (
              &lt;div className="App"&gt;
                  &lt;h1&gt;Users&lt;/h1&gt;
                  &lt;p&gt;The current state is {this.state.message}&lt;/p&gt;
              &lt;/div&gt;
          );
      }
  }
  
  export default App;
  </code></pre>
  
  <p>Here is my server.js:</p>
  
  <pre><code>const express = require('express');
  const users = require('./routes/users');
  const foo = require('./routes/foo');
  
  const app = express();
  const port = process.env.PORT || 8080;
  
  // Set a route for when commands are processed for users
  app.use('/users', users);
  app.use('/foo', foo);
  
  app.get('/api/hello', (req, res) =&gt; {
      res.send({ express: 'Hello From Express' });
  });
  
  app.listen(port, () =&gt; console.log(`Listening on port ${port}`));
  </code></pre>
  
  <p>Here is my foo.js</p>
  
  <pre><code>let express = require('express');
  let router = express.Router();
  
  router.get('/', function(req, res) {
      res.send([{text: "Foo"}]);
  });
  
  router.post('/', function(req, res) {
      res.send('POST handler for /foo route.');
  });
  
  module.exports = router;
  </code></pre>