JSPM

@dolsem/extract-hoc

0.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10
  • Score
    100M100P100Q43718F
  • License MIT

A Babel plugin that enables react-hot-loader to work on HoCs.

Package Exports

  • @dolsem/extract-hoc

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@dolsem/extract-hoc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Extract HoC

A Babel plugin that enables react-hot-loader to work on HoCs.

Why this plugin needs to exist

react-hot-loader won't work if you put the component as an argument in functions (to create a higher order component).

See more at this issue: https://github.com/gaearon/react-hot-loader/issues/650

Installation

$ npm install extract-hoc

In the .babelrc, add extract-hoc/babel before the react-hot-loader/babel:

{
  "plugins": [
    "extract-hoc/babel",
    "react-hot-loader/babel"
  ]
}

License

MIT