1.0.3 • Published 9 years ago

babel-plugin-react-constant-elements v1.0.3

Weekly downloads
90,404
License
MIT
Repository
github
Last release
9 years ago

babel-plugin-react-constant-elements

Treat React JSX elements as value types and hoist them to the highest scope

Installation

$ npm install babel-plugin-react-constant-elements

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["react-constant-elements"]
}

Via CLI

$ babel --plugins react-constant-elements script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["react-constant-elements"]
});