Treat React JSX elements as value types and hoist them to the highest scope
Treat React JSX elements as value types and hoist them to the highest scope
``sh`
$ npm install babel-plugin-transform-react-constant-elements
.babelrc
`json`
{
"plugins": ["transform-react-constant-elements"]
}
`sh`
$ babel --plugins transform-react-constant-elements script.js
`javascript``
require("babel-core").transform("code", {
plugins: ["transform-react-constant-elements"]
});