We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b6621d commit 7c60354Copy full SHA for 7c60354
example/main.js
@@ -3,10 +3,11 @@
3
4
var App = React.createClass({
5
render(){
6
- var imgs = this._getImageList().map(function(url){
+ var onClick = function(){ console.log('Clicked'); };
7
+ var imgs = this._getImageList().map(function(url, index){
8
return React.createElement('div', {
- style: { width: '20%', float: 'left', 'margin-left': '10px' },
9
- }, Img({ src: url, key: url}));
+ style: { width: '20%', float: 'left', marginLeft: '10px' },
10
+ }, Img({ src: url, onClick: onClick, key: 'photo' + index}));
11
});
12
13
0 commit comments