Socket
Book a DemoInstallSign in
Socket

babel-plugin-transform-react-createelement-to-jsx

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-react-createelement-to-jsx

Transforms React.createElement calls to JSX syntax

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
27K
92.8%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-transform-react-createelement-to-jsx build status npm version

Turn React.createElement calls back into JSX syntax.

This is useful for

  • Converting projects that started out in the opinion that “we need no stinking compilers”
  • Converting already-compiled JS into something maintainable (E.g. CJSX syntax → coffee-react-transformdecaffeinatereact-createelement-to-jsxJSX syntax)

Installation

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

Usage

.babelrc

{
  "plugins": [ "transform-react-createelement-to-jsx" ]
}

Via CLI

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

Via Node API

import babel from 'babel-core'

babel.transform('code', {
  plugins: ['transform-react-createelement-to-jsx'],
})

Development

If you want to help with corner cases, here are helpful resources:

Keywords

babel-plugin

FAQs

Package last updated on 14 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts