1.1.0 • Published 6 years ago

react-bundle v1.1.0

Weekly downloads
5
License
BSD-3-Clause
Repository
github
Last release
6 years ago

react-bundle

License: BSD-3-Clause npm standard-readme compliant

Lazy load dependencies (using bundle-loader or import())

Taken from react-router

Table of Contents

Install

yarn add react-bundle

Usage

Using bundle-loader:

import loadSomething from 'bundle-loader?lazy!./Something'

<Bundle load={loadSomething}>
  {(Something) => (
    // do something w/ the module
  )}
</Bundle>

Using import():

<Bundle load={() => import('./Something')}>
  {(Something) => (
    // do something w/ the module
  )}
</Bundle>

License

BSD-3-Clause