title: Lazy load components requiring authentication with react-redux
body: <p>I'm trying to create a website using react+redux.
  I've already setup jwt authentication on the server.
  What I'd like to do is to lazy load some of my components/containers and reducers so that they can be downloaded only by authenticated users. I already know how to hide components from unauthenticated users (client side), but I would prefer to prevent them from downloading the relative javascript code.</p>
  
  <p>I am using webpack, and I've already looked into react-router and <code>require-ensure</code> (<a href="https://stackoverflow.com/a/33044701/2920112">https://stackoverflow.com/a/33044701/2920112</a>), but this approach doesn't seem to handle authentication at all.
  I've also considered using <code>fetch</code> in some way (probably bundling the private code separately with webpack), but I wouldn't know what to do with the bundle once I fetch it.</p>
  
  <p>Am I approaching the problem in the wrong way?
  The only alternative I see is to provide two HTML files, one loading a webpack bundle with only the public content, and one downloading also the private code. This however seems really suboptimal.
  What is the correct approach?</p>