react-bundle

1.1.0 • Public • Published

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

Package Sidebar

Install

npm i react-bundle

Weekly Downloads

11

Version

1.1.0

License

BSD-3-Clause

Unpacked Size

22.4 kB

Total Files

6

Last publish

Collaborators

  • ramitos