FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [View Raw Code]   [Original HTTPS Page]

babel/packages/babel-plugin-transform-react-jsx at master · bmeurant/babel · GitHub

Repository navigation

Latest commit

 

History

History
 
 
  1. babel
  2. packages

babel-plugin-transform-react-jsx

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

babel-plugin-transform-react-jsx

Turn JSX into React function calls

Installation

$ npm install babel-plugin-transform-react-jsx

Usage

Via .babelrc (Recommended)

.babelrc

// without options
{
  "plugins": ["transform-react-jsx"]
}
// with options
{
  "plugins": [
    ["transform-react-jsx", {
      "pragma": "dom" // default pragma is React.createElement
    }]
  ]
}

Via CLI

$ babel --plugins transform-react-jsx script.js

Via Node API

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

Back | FazBrowse Home | New Git URL