React Loadable: Component-centric code splitting and loading in React

Just saw this, it’s a very similar approach to 1.5’s dynamic imports it seems:

It’s interesting to see patterns develop around component loading. Hopefully we can all settle on similar practices and syntaxes.

3 Likes

It looks like this will work completely out of the box in Meteor 1.5! That’s because they are both based on the dynamic import standard.

3 Likes

So what are the differences between this and what 1.5 does? From a code-splitting point of view, what would be the advantages of using 1.5 over this + Webpack?

This doesn’t have anything to do with webpack. This is a React component that uses a standard ecmascript feature to dynamically load React components. It works equally well with webpack and meteor, which are two comparable bundling systems.

Oh ok, so this is something you’d use on top of dynamic imports, not an alternative to it. I don’t know much about Webpack so I didn’t know it already supported dynamic imports.

1 Like

@benjamn explains how to use React Loadable with Meteor in the ‘Release 1.5’ pull request: https://github.com/meteor/meteor/pull/8327#issuecomment-286220281

1 Like