babel-plugin-react-constant-elements

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

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
babel-plugin-react-constant-elements
1.0.37 years ago7 years agoMinified + gzip package size for babel-plugin-react-constant-elements in KB

Readme

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"]
});