0.1.2 • Published 4 years ago

babel-plugin-transform-jsx-list v0.1.2

Weekly downloads
1,990
License
-
Repository
github
Last release
4 years ago

babel-plugin-transform-jsx-list

Support of transform jsx list directive.

Example

In

<View x-for={(item, key) in foo}>key: {key}, item: {item}</View>

Out

{createList.call(this, foo, (item, key) => <View>key: {key}, item: {item}</View>)}

Installation

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

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["transform-jsx-list"]
}

Via CLI

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

Via Node API

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