1
0
mirror of https://github.com/bobwen-dev/react-templates synced 2025-04-12 00:56:39 +02:00
react-templates/test/data/repeat-with-index.rt.js
2017-06-29 10:47:10 +03:00

17 lines
418 B
JavaScript

define([
'react',
'lodash'
], function (React, _) {
'use strict';
return function () {
function repeatItem1(item, customIndex) {
return React.createElement('li', {}, item, ' is number ', customIndex);
}
return React.createElement.apply(this, [
'ul',
{},
_.map(this.props.collection, repeatItem1.bind(this))
]);
};
});