title: React + Sails : Handling Routes
body: <p>I'm developing a web application using Sails and React. My main purpose of using sails is take advantage of MVC pattern, while React for serving views. Since, Sails provides it own routing, but I want to make use of my React-router instead. </p>
  
  <p>For ex : In react-router we have <code>NotFoundRoute</code>, so when I'm accessing a page which is not present, it should show me the handler that I have defined for <code>NotFoundRoute</code>. Instead, it is showing me the sails 404 page.</p>
  
  <p>So how to get control over the sails route when I want to use my React route?</p>
  
  <p><strong>React Routes</strong></p>
  
  <pre><code>var JSX = require('babel/register'),
      React = require('react'),
      Router = require('react-router'),
      DefaultRoute = Router.DefaultRoute,
      NotFoundRoute = Router.NotFoundRoute,
      Route = Router.Route;
  
  
  var routes = (
          &lt;Route name="splash" path="/" handler={require('../main')}&gt;
              &lt;DefaultRoute handler={require('../components/Signup/signup')} /&gt;   
              &lt;Route name="signup" path="/user/signup" handler={require('../components/Signup/signup')} /&gt;    
              &lt;Route name="home" path="/user/home/:id" handler={require('../components/Home/home')} /&gt;
              &lt;NotFoundRoute handler={require('../components/commons/notFound')} /&gt;
          &lt;/Route&gt;
      );
  
  module.exports = routes;
  </code></pre>
  
  <p><strong>Sails Routes</strong></p>
  
  <pre><code>module.exports.routes = {
  
  
    '/': {
      view: 'homepage'
    },
  
    '/user/home/:id' : 'UserController.home'
  
  
  };
  </code></pre>
  
  <p>I'm totally new to this frameworks and not able to find enough resources online..So sorry this silly question.</p>