title: react-router-dom, is there a `getComponent` method for code splitting?
body: <p>I try to figure out how code splitting work with <code>webpack2.x</code> and <code>react-router-dom</code>.</p>
  
  <p><code>"react-router-dom": "^4.0.0"</code></p>
  
  <p>But I read the doc and did not find a way to use like this:</p>
  
  <p><code>getComponent</code> still work or not?</p>
  
  <p>I find the <code>react-router-dom</code> doc just give you some example, no explain.</p>
  
  <p>I saw <code>react-router</code> is <code>v4.0.0-beta.8</code>, Maybe I should use <code>react-router-dom</code> later?</p>
  
  <pre><code>module.exports = {
      path: 'home',
      getComponent(nextState, cb) {
          import('./main').then(component =&gt; {
              cb(null, component);
          }).catch(err =&gt; {
              console.log('Failed to load "home" component', err);
          });
      }
  };
  </code></pre>