vasanthk / react-bits

✨ React patterns, techniques, tips and tricks ✨
https://vasanthk.gitbooks.io/react-bits
Creative Commons Attribution 4.0 International
16.97k stars 1.1k forks source link

React Loadable #40

Open jamiebuilds opened 7 years ago

jamiebuilds commented 7 years ago

(Shameless plug)

I wrote this library react-loadable to standardize the workflow around code-splitting at the component-level and asynchronously loading components. I wrote a blog post too.

Facebook does code-splitting this way too.

I think we should be encouraging more of the community to do this since I've heard of people dropping 100s of KBs from their bundles. It's really more a pattern than a library anyways.

elreeda commented 7 years ago

+1

vasanthk commented 7 years ago

This is great. I agree this pattern is something we should encourage more. Been a pretty busy week so far, I shall try to put a section for this by the weekend. Open to accept PRs as well for a section on this.

Thank for sharing it @thejameskyle 👍