| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Turn JSX into React function calls
$ npm install babel-plugin-transform-react-jsx.babelrc
// without options
{
"plugins": ["transform-react-jsx"]
}
// with options
{
"plugins": [
["transform-react-jsx", {
"pragma": "dom" // default pragma is React.createElement
}]
]
}$ babel --plugins transform-react-jsx script.jsrequire("babel-core").transform("code", {
plugins: ["transform-react-jsx"]
});| Back | FazBrowse Home | New Git URL |