GitXplorerGitXplorer
f

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

public
54 stars
12 forks
3 issues

Commits

List of commits on branch master.
Verified
63137b6ea0545ac17c11d4850f124b652cf3bb12

travis.{org→com}

fflying-sheep committed 4 years ago
Unverified
a4b3b2bd61e50cfc1ae5b9d809471025a02cb0bd

adds a flag to the sample call of babel cli (#9)

ccapaj committed 6 years ago
Verified
5017a9bcd53eda9172f7ce01aa7eac02026e23e8

Update .travis.yml

fflying-sheep committed 6 years ago
Verified
646b9d8a9c57500a1f11f5b6d9baed648aef7b79

Update README.md

fflying-sheep committed 6 years ago
Unverified
664d28cb3e7844a10e053c77bb5c690cc592fe69

Rename isSpreadProperty to isSpreadElement (#6)

ddanielhusar committed 6 years ago
Unverified
45c91691899c97d3ad20af217b71e54b7c90c365

v1.1.0: babel 7

fflying-sheep committed 6 years ago

README

The README file for this repository.

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

Turn React.createElement calls back into JSX syntax.

This is useful for

  1. Converting projects that started out in the opinion that “we need no stinking compilers”
  2. 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

Via .babelrc (Recommended)

.babelrc

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

Via CLI

$ babel --no-babelrc --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: