Q: React matchRoutes - server side rendering matching more than one route When I browse www.localhost.com:8080/abc - Main component fetchMethod is being called - and also the next component 'One' with the path path: '/abc/:param', is being loaded - when I console out the server code - below is my route set-up in server.js and routes.js - and this is a server side rendering app - with fetchData on every component.. what could be my issue for calling 2 components for one route?

A: I've attempted to emulate the code as best as possible here in the snippet. For each request the function returns the expected route and the expected component. 
In order to make this demo work I commented out component.fetchData and it works, so component.fetchData could be causing the issue. Perhaps Main.fetchData is making a request to a /abc/:param route?
If component.fetchData isn't the culprit, I would look into the node console to see if /abc/:param is actually being requested. 
If a /abc/:param route isn't being requested it might have something to do with the Express setup. And if that's the case we'll need to see more of the code. 


const handleRoute = function(req, res, next) {
  let {
    path,
    component
  } = routes.find(
    ({
      path,
      exact
    }) => {
      foundPath = ReactRouter.matchPath(req.url, {
        path,
        exact,
        strict: false
      });
      return foundPath;
    }) || {};
  component.fetchData()
  return {path, component} 
  //component.fetchData = () => new Promise((resolve, reject) => resolve());
  
}

class Main extends React.Component {
  static fetchData({ store }) {
    console.log('fetching data');
    return store.dispatch(actions.getMainData());
  }

  componentWillMount() {
    this.props.getMainData();
  }
}

const routes = [{
    path: '/abc',
    component: Main,
    exact: true,
  },
  {
    path: '/abc/:param',
    component: 'One',
    exact: true,
  },
  {
    path: '/abc/def/:param',
    component: 'Two',
    exact: true,
  }
];

handleRoute({url: "/abc"});
handleRoute({url: "/abc/123"});
handleRoute({url: "/abc/def/123"});
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react-dom.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-router/4.2.0/react-router.min.js"></script>


