React Base Fiddle (JSX)
Starting point for creating JSFiddles with React. This uses React with Addons.
HTML
<script src="http://fb.me/JSXTransformer-0.12.1.js"></script>
<script src="http://fb.me/react-with-addons-0.12.1.js"></script>
CSS
.row {
height:40px;
padding:5px;
background:#333;
color:#fcfcfc;
width:33%;
line-height:40px;
text-align:center;
cursor:pointer;
}
.row:hover {
height:40px;
padding:5px;
background:#555;
color:#ddd;
width:33%;
}
React
var data = [{name:'Jhon', age:28, city:'HO'},{name:'Onhj', age:82, city:'HN'},{name:'Nohj', age:41, city:'IT'}]
var Hello = React.createClass({
render: function() {
var _data = this.props.info;
console.log(_data);
return(
<div>
{_data.map(function(object, i){
return <div className={"row"} key={i}>
{[ object.name ,
<b className="fosfo" key={i}> {object.city} </b> , // remove the key
object.age
]}
</div>;
})}
</div>
);
}
});
React.render(<Hello info={data} />, document.body);