$ npm install babel-plugin-transform-jsx-list
Support of transform jsx list directive.
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>)}
$ npm install babel-plugin-transform-jsx-condition
.babelrc
(Recommended).babelrc
{
"plugins": ["transform-jsx-list"]
}
$ babel --plugins transform-jsx-list script.js
require("babel-core").transform("code", {
plugins: ["transform-jsx-list"]
});
© 2010 - cnpmjs.org x YWFE | Home | YWFE