As a crude, simple, easy win for making our main bundle smaller, I’ll pull out all npm modules with the CommonsChunkPlugin — see the plugins array at the bottom, in particular the
minChunks function, in which I filter in everything that comes from
…ts. Instead, state should be managed by higher-level “container” components, or via Flux/Redux/etc. Stateless functional components don’t support state or lifecycle methods. This is a good thing. Why? Because it protects from laziness.