title: Redirect after POST using reactjs
body: <p>I have express configured to route to <code>redirect</code> as follow:</p>
  
  <p>in routes/redirect.js:</p>
  
  <pre><code>var express = require('express');
  var router = express.Router();
  router.post('/', function(req, res, next) {
      res.send('received POST data: ' + req.body.data); 
  });
  module.exports = router;
  </code></pre>
  
  <p>in app.js:</p>
  
  <pre><code>...
  var redirect = require('./routes/redirect');
  var app = express();
  ...
  app.use('/redirect', redirect);
  </code></pre>
  
  <p>and in component.jsx:</p>
  
  <pre><code>var React = require('react');
  var Component = React.createClass({
      render: function(){
              return (
                  &lt;form&gt;
                      &lt;input type="text" ref="data" placeholder="Send some data"/&gt;
                      &lt;button onClick={this.handleSubmit}&gt;Send&lt;/button&gt;
                  &lt;/form&gt;
              );
          },
  
       handleSubmit: function() {
              var data = this.refs.data.getDOMNode().value;
              // TODO: how do I send 'data' as POST request and redirect to /redirect ?
              // i.e. POST and redirect to localhost:3000/redirect like in a classic 
              // form submit{action='redirect',method='post'} way 
          }
  });
  
  module.exports=Component;
  </code></pre>
  
  <p>I've included the description of my question in the TODO section of the code. Is there a way to do it purely with Node+React without installing all kind of plugins? </p>